spec/macros4cuke/templating/engine_spec.rb in macros4cuke-0.5.15 vs spec/macros4cuke/templating/engine_spec.rb in macros4cuke-0.5.16

- old
+ new

@@ -152,18 +152,18 @@ expect(result[2]).to eq([:static, ' end']) end it 'should complain if a tag misses an closing chevron' do sample_text = 'begin <some_tag\> end' - exc = StandardError + exc = StandardError err_msg = "Missing closing chevron '>'." expect { Engine.parse(sample_text) }.to raise_error(exc, err_msg) end it 'should complain if a text misses an opening chevron' do sample_text = 'begin <some_tag> > end' - exc = StandardError + exc = StandardError err_msg = "Missing opening chevron '<'." expect { Engine.parse(sample_text) }.to raise_error(exc, err_msg) end it 'should complain if a text has nested opening chevrons' do @@ -195,11 +195,11 @@ expect { Engine.new sophisticated_template }.not_to raise_error instance = Engine.new sophisticated_template elements = instance.instance_variable_get(:@representation) sections = elements.select { |e| e.is_a?(Section) } names = sections.map(&:to_s) - expect(names).to eq(%w(<?address> <?birthdate> <?dummy>)) + expect(names).to eq(%w[<?address> <?birthdate> <?dummy>]) end it 'should complain when a placeholder is empty or blank' do text_w_empty_arg = sample_template.sub(/userid/, '') exc = Macros4Cuke::EmptyArgumentError @@ -241,11 +241,11 @@ end # context context 'Provided services:' do it 'should know the variable(s) it contains' do # Case using the sample template - expect(subject.variables).to be == %w(userid password) + expect(subject.variables).to be == %w[userid password] # Case of an empty source template text instance = Engine.new '' expect(instance.variables).to be_empty end @@ -327,10 +327,10 @@ expect(rendered_text).to eq(expected) end it 'should render multivalued actuals' do - locals = { 'userid' => %w(johndoe yeti) } # Silly case + locals = { 'userid' => %w[johndoe yeti] } # Silly case rendered_text = subject.render(Object.new, locals) expected = <<-SNIPPET Given I landed in the homepage And I fill in "Username" with "johndoe<br/>yeti"