require "spec_helper"

describe Alephant::Renderer::Response do
  subject { described_class.new content }
  let(:content) { "<h1>foo</h1>" }

  describe "#to_json" do
    let(:expected_structure) { "content" => content }

    specify do
      expect(JSON.parse subject.to_json).to eq expected_structure
    end
  end
end


require "spec_helper"

describe Alephant::Renderer::Response do
  subject { described_class.new content }
  let(:content) { "<h1>foo</h1>" }

  describe "#to_json" do
    let(:expected_structure) {{ "content" => content }}

    specify do
      expect(JSON.parse subject.to_json).to eq expected_structure
    end
  end
end


Add curly brackets around let expression...
Add curly brackets around let expression...

This was a typo. Without the inner curly brackets, the Ruby parser
failed because the outer curly brackets were part of a block/Proc and so
the hash rocket => syntax was considered invalid
