Sha256: 83094eae21854d1df7c4a2329c21afa1243fc34e7a2ae31658c1a3253649b0fd
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
require 'spec_helper' module Notifiers describe Knotify do it_should_behave_like 'a notifier' before do @knotify = Knotify.new end describe '#message' do it "should set the message instance variable" do @knotify.message('Bulls on Parade') expect(@knotify.instance_variable_get(:@message)).to eql 'Bulls on Parade' end it "should be possible to set the message instance variable" do @knotify.message('Wake Up') expect(@knotify.instance_variable_get(:@message)).to eql 'Wake Up' end end describe '#title' do it "should set the title" do @knotify.title('Rage Against the Machine') expect(@knotify.instance_variable_get(:@title)).to eql 'Rage Against the Machine' end it "should be possible to set the title" do @knotify.title('AudioSlave') expect(@knotify.instance_variable_get(:@title)).to eql 'AudioSlave' end end describe '#to_s' do it "should return the entire command" do command = @knotify.title('Ruby').message('For the Win').to_s expect(command).to eql "dcop knotify default notify eventname 'Ruby' 'For the Win' '' '' 12 1" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notifiers-1.2.2 | spec/notifiers/knotify_spec.rb |
notifiers-1.2.1 | spec/notifiers/knotify_spec.rb |