spec/singular_spec.rb in cistern-0.11.2.pre2 vs spec/singular_spec.rb in cistern-0.11.2

- old
+ new

@@ -4,24 +4,24 @@ class SampleSingular < Cistern::Singular attribute :name attribute :count, type: :number def fetch_attributes - #test that initialize waits for service to be defined - raise "missing service" unless service + #test that initialize waits for connection to be defined + raise "missing connection" unless connection @counter ||= 0 @counter += 1 {name: "amazing", count: @counter} end end it "should work" do - expect(SampleSingular.new(service: :fake).name).to eq("amazing") + expect(SampleSingular.new(connection: :fake).name).to eq("amazing") end it "should reload" do - singular = SampleSingular.new(service: :fake) + singular = SampleSingular.new(connection: :fake) old_count = singular.count expect(singular.count).to eq(old_count) expect(singular.reload.count).to be > old_count end end