Skip to content

Commit

Permalink
Remove cruft accidentally committed
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Sep 26, 2010
1 parent 08ffab4 commit 24bba82
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions spec/pickle/session/api_spec.rb
Expand Up @@ -124,10 +124,6 @@
end
end
end

describe "#make_from_table_and_store('users', <table>)" do

end
end

describe "(finding first)" do
Expand Down Expand Up @@ -172,40 +168,4 @@
subject.find_all_and_store('users', 'age: 23')
end
end

context "when given a table without a matching pickle ref column" do
let :table do
mock(:hashes => [{'name' => 'Fred'}, {'name' => 'Betty'}])
end

it "#create_models_from_table(<plural factory>, <table>) should call create_model for each of the table hashes with plain factory name and return the models" do
should_receive(:create_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
should_receive(:create_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
create_models_from_table("users", table).should == [:fred, :betty]
end

it "#find_models_from_table(<plural factory>, <table>) should call find_model for each of the table hashes with plain factory name and return the models" do
should_receive(:find_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
should_receive(:find_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
find_models_from_table("users", table).should == [:fred, :betty]
end
end

context "when given a table with a matching pickle ref column" do
let :table do
mock(:hashes => [{'user' => "fred", 'name' => 'Fred'}, {'user' => "betty", 'name' => 'Betty'}])
end

it "#create_models_from_table(<plural factory>, <table>) should call create_model for each of the table hashes with labelled pickle ref" do
should_receive(:create_model).with("user \"fred\"", 'name' => "Fred").once.ordered.and_return(:fred)
should_receive(:create_model).with("user \"betty\"", 'name' => "Betty").once.ordered.and_return(:betty)
create_models_from_table("users", table).should == [:fred, :betty]
end

it "#find_models_from_table(<plural factory>, <table>) should call find_model for each of the table hashes with labelled pickle ref" do
should_receive(:find_model).with("user \"fred\"", 'name' => "Fred").once.ordered.and_return(:fred)
should_receive(:find_model).with("user \"betty\"", 'name' => "Betty").once.ordered.and_return(:betty)
find_models_from_table("users", table).should == [:fred, :betty]
end
end
end

0 comments on commit 24bba82

Please sign in to comment.