Sha256: 5dbbe30d3ba1920163c34212eea9f0e51c9e883c714a934a39bead6ba3489f7e

Contents?: true

Size: 836 Bytes

Versions: 2

Compression:

Stored size: 836 Bytes

Contents

require 'spec_helper'
require 'torkify/event/test_event'

module Torkify::Event
  describe TestEvent do

    context "with typical seed data" do
      before do
        @type = 'test'
        @file = 'file'
        @lines = []
        @log_file = 'log_file'
        @worker = 1
      end

      subject { TestEvent.new(@type, @file, @lines, @log_file, @worker) }

      its(:type)     { should == @type }
      its(:file)     { should == @file }
      its(:lines)    { should == @lines }
      its(:log_file) { should == @log_file }
      its(:worker)   { should == @worker }
      its(:to_s)     { should == 'TEST file' }
      its(:message)  { should == :on_test }

      context "with line numbers" do
        before { @lines = [1, 5, 12] }
        its(:to_s)   { should == 'TEST file (lines 1, 5, 12)' }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
torkify-0.0.3 spec/event/test_event_spec.rb
torkify-0.0.2 spec/event/test_event_spec.rb