features/configuration/fake_ar_attributes.feature in bogus-0.1.0 vs features/configuration/fake_ar_attributes.feature in bogus-0.1.1
- old
+ new
@@ -16,11 +16,11 @@
Bogus.configure do |c|
c.fake_ar_attributes = true
end
Scenario: Adding missing accessors to AR classes
- Given a file named "foo.rb" with:
+ Given a file named "blog_post.rb" with:
"""ruby
require 'active_record'
require 'nulldb'
ActiveRecord::Schema.verbose = false
@@ -41,9 +41,11 @@
end
"""
Then the following test should pass:
"""ruby
+ require_relative 'blog_post'
+
post = fake(:blog_post, name: "the name")
stub(post).tags { "foo, bar" }
post.name.should == "the name"
post.tags.should == "foo, bar"