Sha256: f5caa7a96c9caa06a3d1feb8f7996f427fd0365cc7cf5934ac5aab7ad761d084

Contents?: true

Size: 591 Bytes

Versions: 2

Compression:

Stored size: 591 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../../unit_spec_helper")

module JsSpec
  module Resources
    describe Runners do
      attr_reader :runner
      before do
        @runner = Runners.new
      end

      describe "#locate" do
        it "when passed 'firefox', returns a Firefox1Runner" do
          runner.locate('firefox').is_a?(Runners::FirefoxRunner).should be_true
        end

        it "when not passed 'firefox', raises an error" do
          lambda do
            runner.locate('invalid')
          end.should raise_error
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
js_spec-0.2.0 spec/unit/js_spec/resources/runner_spec.rb
js_spec-0.2.1 spec/unit/js_spec/resources/runner_spec.rb