Skip to content

Commit

Permalink
Added spec, expected it to fail. Further investigation required [#1]
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason L Perry committed Oct 30, 2008
1 parent c043aae commit fba0bc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion spec/fixtures/github/payload.js
Expand Up @@ -31,7 +31,7 @@
"email": "ambethia@example.com",
"name": "Jason L Perry"
},
"message": "Update threads via email",
"message": "Update threads via email [volley]",
"timestamp": "2008-10-18T14:36:34-08:00"
}
],
Expand Down
16 changes: 6 additions & 10 deletions spec/models/match_spec.rb
Expand Up @@ -23,6 +23,7 @@
@payload = File.open(fixture_path + "/github/payload.js").read
@match.stub!(:active_volley).and_return(@volley)
@match.stub!(:users).and_return(stub("ARProxy", :[] => [], :find_by_email => @player))
@match.stub!(:volley!).and_return(true)
end

it "should create many commits" do
Expand All @@ -32,6 +33,10 @@
it "should find the player" do
@match.users.should_receive(:find_by_email).with("ambethia@example.com").twice
end

it "should volley the match" do
@match.should_receive(:volley!)
end

after(:each) do
@match.push(@payload)
Expand All @@ -44,20 +49,11 @@
it "should not include users that aren't playing" do
matches(:binary_frisbee).possible_admins.should_not include(users(:madcowley))
end

it "should not include admin twice if they're playing" do
matches(:binary_frisbee).possible_admins.size.should == 2
end

end

describe "volley receives a commit" do
it "should update the match updated_at timestamp" do
@payload = File.open(fixture_path + "/github/payload.js").read
@match.should_receive(:updated_at=)
@match.push(@payload)
end
end

end

0 comments on commit fba0bc8

Please sign in to comment.