Skip to content

Commit

Permalink
use explicit Factory.create method
Browse files Browse the repository at this point in the history
  • Loading branch information
Yves Senn committed Apr 30, 2012
1 parent aef7544 commit 17fa437
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/backyard/adapter/factory_girl.rb
Expand Up @@ -7,7 +7,7 @@ def class_for_type(model_type)
end end


def create(model_type, attributes) def create(model_type, attributes)
Factory(model_type, attributes) factory_girl_class.create(model_type, attributes)
end end


def factory_girl_class def factory_girl_class
Expand Down
2 changes: 1 addition & 1 deletion spec/backyard/adapter/factory_girl_spec.rb
Expand Up @@ -4,7 +4,7 @@


describe "#create" do describe "#create" do
it "should delegate to factory_girl" do it "should delegate to factory_girl" do
subject.should_receive(:Factory).with(:entry, {:name => '123 Entry'}) Factory.should_receive(:create).with(:entry, {:name => '123 Entry'})
subject.create :entry, {:name => '123 Entry'} subject.create :entry, {:name => '123 Entry'}
end end
end end
Expand Down

0 comments on commit 17fa437

Please sign in to comment.