test/surrounded_context_test.rb in surrounded-0.9.3 vs test/surrounded_context_test.rb in surrounded-0.9.4

- old
+ new

@@ -257,23 +257,27 @@ it 'assigns a defined role to each item in a role player collection' do assert_equal "member show, member show", context.get_member_show end end -class Keyworder - extend Surrounded::Context +begin + class Keyworder + extend Surrounded::Context - keyword_initialize :this, :that -end - -describe Surrounded::Context, 'keyword initializers' do - it 'works with keyword arguments' do - assert context = Keyworder.new(this: User.new('Jim'), that: User.new('Guille')) + keyword_initialize :this, :that end - it 'raises errors with missing keywords' do - err = assert_raises(ArgumentError){ - Keyworder.new(this: User.new('Amy')) - } - assert_match /missing keyword: that/, err.message + describe Surrounded::Context, 'keyword initializers' do + it 'works with keyword arguments' do + assert Keyworder.new(this: User.new('Jim'), that: User.new('Guille')) + end + + it 'raises errors with missing keywords' do + err = assert_raises(ArgumentError){ + Keyworder.new(this: User.new('Amy')) + } + assert_match(/missing keyword: that/, err.message) + end end +rescue SyntaxError + STDOUT.puts "No support for keywords" end