Sha256: 3446580a8357d0f81ef8fca5a6244c3bee48f9583437f39dc91d48ea9506f726

Contents?: true

Size: 1.2 KB

Versions: 5

Compression:

Stored size: 1.2 KB

Contents

require_relative '../../spec_helper'
require 'soundcheck/project'
require 'soundcheck/frameworks'

describe "Frameworks" do
  let(:project) { Project.new(fixture("null-project")) }

  describe "Ruby Cutest" do
    # This is for the Ruby library called Cutest,
    # not the C Unit Testing library called CuTest
    #
    # https://github.com/djanowski/cutest
    
    let(:framework) { Frameworks::RubyCutest.new(project) }

    it "should find the rspec framework" do
      project.stub!(:root => fixture("ruby-cutest"))
      framework.present?.should be_true
    end
    
    it "should not find when not there" do
      framework.present?.should be_false
    end

    it "should work with no args" do
      framework.command().should == "cutest test/*.rb"
    end

    it "should not do anything when args contain no cutest files" do
      framework.command("features/a.feature").should == nil
    end

    it "should work with args" do
      cmd = framework.command("test/a.rb", "test/b.rb")
      cmd.should == "cutest test/a.rb test/b.rb"
    end

    it "should filter invalid non-cutest args" do
      cmd = framework.command("test/a.rb", "features/a.feature")
      cmd.should == "cutest test/a.rb"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
soundcheck-0.4.0 spec/soundcheck/frameworks/ruby_cutest_spec.rb
soundcheck-0.3.0 spec/soundcheck/frameworks/ruby_cutest_spec.rb
soundcheck-0.2.4.beta1 spec/soundcheck/frameworks/ruby_cutest_spec.rb
soundcheck-0.2.3 spec/soundcheck/frameworks/ruby_cutest_spec.rb
soundcheck-0.2.2 spec/soundcheck/frameworks/ruby_cutest_spec.rb