Machinist is a factory framework for building test objects in Ruby. It's made to be a drop-in replacement for fixtures in Ruby on Rails testing suites.
Questions tagged [machinist]
34 questions
0
votes
0 answers
discrepancy between requiring a path in rails console vs. rails s (WeBRICK)
I'm using Machinist blueprints in development.
from development.rb:
config.after_initialize do
require 'spec/support/blueprints'
puts "********* blueprints loaded! *********"
end
it works fine in the console.
michael-schwabs-macbook-pro:medtext…

schwabsauce
- 399
- 5
- 16
0
votes
2 answers
Named Blueprints with factory_girl
I am using Factory Girl but like the machinist syntax. So I wonder, if there is any way creating a named blueprint for class, so that I can have something like that:
User.blueprint(:no_discount_user) do
admin false
hashed_password…

Jason Nerer
- 551
- 7
- 19
0
votes
1 answer
Problems with rspec 3, capybara and machinist 2
I have this feature test (Store model have a uniqueness validation):
feature "Index" do
before do
3.times { Store.make! }
end
scenario "User visit index" do
visit stores_path
within("table.table") do
Store.all.each do…

Armando
- 940
- 7
- 16
0
votes
2 answers
Error when logging in with Machinist in Shoulda test
I am having some trouble getting the right usage of Machinist and Shoulda in my testing.
Here is my test:
context "on POST method rating" do
p = Product.make
u = nil
setup do
u = login_as
post :vote, :rating => 3, :id => p
end
should "set…