Sha256: 60792541f7e07cacd8d2f35b81739acc5d4372f31d1e787aae14e7f80d6a92b9
Contents?: true
Size: 484 Bytes
Versions: 21
Compression:
Stored size: 484 Bytes
Contents
require 'spec_helper' describe AngularSprinkles::ConstructorCollection do let(:json_wrapper) { ->{} } let(:stub) { "stub" } let(:object_wrapper) { double(new: stub) } subject { described_class.new(json_wrapper: json_wrapper, object_wrapper: object_wrapper) } it 'turns objects into a wrapped js string' do # add two items to the collection subject.push(1, 2) subject.push(1, 2) expect(subject.to_json).to eq("#{stub.to_json}\n#{stub.to_json}") end end
Version data entries
21 entries across 21 versions & 1 rubygems