Sha256: 99190dcadcf473cbb715c16af9617c33ef7f4d41ccb70c0830742c3a6da617b8
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
require 'spec_helper' describe BigbluebuttonMeeting do it "should be reconized" do lambda { BigbluebuttonMeeting.new }.should_not raise_error end [:running, :has_been_forcibly_ended, :room].each do |attr| it { should respond_to(attr) } it { should respond_to(:"#{attr}=") } end context "equality" do let(:meeting1) { m = BigbluebuttonMeeting.new m.running = true m.has_been_forcibly_ended = false m.room = nil m } let(:meeting2) { m = BigbluebuttonMeeting.new m.running = false m.has_been_forcibly_ended = true m.room = nil m } let(:meeting3) { m = BigbluebuttonMeeting.new m.running = meeting1.running m.has_been_forcibly_ended = meeting1.has_been_forcibly_ended m.room = meeting1.room m } it { meeting1.should == meeting3 } it { meeting1.should_not == meeting2 } it { meeting2.should_not == meeting3 } end context "gets params from hash" do let(:hash) { {:running=>"false", :hasBeenForciblyEnded=>"true"} } let(:meeting) { BigbluebuttonMeeting.new } it "standard case" do meeting.from_hash(hash) meeting.running.should == false meeting.has_been_forcibly_ended.should == true end it "case insensitive" do hash[:running] = "TRue" hash[:hasBeenForciblyEnded] = "FalSE" meeting.from_hash(hash) meeting.running.should == true meeting.has_been_forcibly_ended.should == false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bigbluebutton_rails-0.0.2 | spec/classes/bigbluebutton_meeting_spec.rb |