Sha256: d1ce8d2bb1f3dab739fd9035c7c04b613434b6cd14c155b51f7d3b30c2c25156
Contents?: true
Size: 976 Bytes
Versions: 3
Compression:
Stored size: 976 Bytes
Contents
require 'spec_helper' describe Project do before do allow_any_instance_of(Project).to receive(:subscribe_owner_to_success_list) allow_any_instance_of(Project).to receive(:subscribe_owner_to_failed_list) end context "when project is successful" do let(:project) { Project.new } before do allow(project).to receive(:pledged){ 30 } expect(project).to receive(:subscribe_owner_to_success_list) expect(project).to_not receive(:subscribe_owner_to_failed_list) end it("should receive subscribe_owner_to_success_list"){ project.notify_observers :from_online_to_successful } end context "when project is failed" do let(:project) { Project.new } before do expect(project).to_not receive(:subscribe_owner_to_success_list) expect(project).to receive(:subscribe_owner_to_failed_list) end it("should receive subscribe_owner_to_failed_list"){ project.notify_observers :from_online_to_failed } end end
Version data entries
3 entries across 3 versions & 1 rubygems