Skip to content

Instantly share code, notes, and snippets.

@farnoy
Created January 18, 2013 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farnoy/4568515 to your computer and use it in GitHub Desktop.
Save farnoy/4568515 to your computer and use it in GitHub Desktop.
describe Group do
describe 'permissions' do
describe '#permissions= setter' do
let(:opts) { {a: 1} }
def g(params = String.new) Group.new(permissions: params).permissions; end
it('accepts hash') { g(opts).should eq(opts) }
it('accepts JSON') { g(JSON.generate opts).should eq(opts) }
it('creates default JSON object') { g.should eq(Hash.new) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment