Skip to content

Instantly share code, notes, and snippets.

@akiellor
Created March 20, 2011 01:54
Show Gist options
  • Save akiellor/877984 to your computer and use it in GitHub Desktop.
Save akiellor/877984 to your computer and use it in GitHub Desktop.
A simple RSpec test.
describe Hash do
context "with no keys" do
subject { Hash.new }
its(:size) { should == 0 }
end
context "including :a_key => 'a value'" do
subject { {:a_key => 'a_value'} }
its(:size) { should == 1 }
it { should have_key :a_key }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment