spec/code/parser/dictionnary_spec.rb in template-ruby-0.4.0 vs spec/code/parser/dictionnary_spec.rb in template-ruby-0.5.0

- old
+ new

@@ -1,19 +1,18 @@ require "spec_helper" RSpec.describe Code::Parser::Dictionnary do - subject { described_class.new.parse(input) } + subject { Code::Parser.parse(input) } [ - '{name: "Dorian"}', - '{a: true, "b": false}', - "{ true => 1, false => 2}", + "{}", + "{ }", + "{/* comment */}", + "{ a: 1, b: 2, c: 3 }", + '{ "first_name": "Dorian" }' ].each do |input| - context input.inspect do + context input do let(:input) { input } - - it "succeeds" do - expect { subject }.to_not raise_error - end + it { subject } end end end