Sha256: c8233f37bab35dc7ab87af6fb06c3b023dd4f4f90e3c901ca0e42c56169c03be

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe Knotify do

  before do
    @knotify = Knotify.new
  end

  describe '#message' do
    it "should set the message instance variable" do
      @knotify.message('Bulls on Parade')
      @knotify.instance_variable_get(:@message).should == 'Bulls on Parade'
    end

    it "should be possible to set the message instance variable" do
      @knotify.message('Wake Up')
      @knotify.instance_variable_get(:@message).should == 'Wake Up'
    end
  end

  describe '#title' do

    it "should set the title" do
      @knotify.title('Rage Against the Machine')
      @knotify.instance_variable_get(:@title).should == 'Rage Against the Machine'
    end

    it "should be possible to set the title" do
      @knotify.title('AudioSlave')
      @knotify.instance_variable_get(:@title).should == 'AudioSlave'
    end

  end

  describe '#to_s' do

    it "should return the entire command" do
      command = @knotify.title('Ruby').message('For the Win').to_s
      command.should == "dcop knotify default notify eventname 'Ruby' 'For the Win' '' '' 12 1"
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notifiers-1.2.0 spec/notifiers/knotify_spec.rb