Skip to content

Commit

Permalink
Bump C0 to 100% (it's just the easiest number to remember)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Jan 22, 2009
1 parent bd4123c commit 99f78c0
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions spec/lib/pickle_session_spec.rb
Expand Up @@ -2,18 +2,35 @@

describe Pickle::Session do
include Pickle::Session

describe "missing methods" do
describe "Pickle::Session proxy missing methods to parser", :shared => true do
it "should forward to pickle_parser it responds_to them" do
pickle_parser.should_receive(:parse_model)
parse_model
@it.pickle_parser.should_receive(:parse_model)
@it.parse_model
end

it "should raise error if pickle_parser don't know about em" do
lambda { parse_infinity }.should raise_error
lambda { @it.parse_infinity }.should raise_error
end
end


describe "including Pickle::Session" do
before do
@it = self
end

it_should_behave_like "Pickle::Session proxy missing methods to parser"
end

describe "extending Pickle::Session" do
before do
@it = Object.new
@it.extend Pickle::Session
end

it_should_behave_like "Pickle::Session proxy missing methods to parser"
end

describe "after storing a single user", :shared => true do
it "created_models('user') should be array containing the original user" do
created_models('user').should == [@user]
Expand Down

0 comments on commit 99f78c0

Please sign in to comment.