Sha256: e2bdd15f1918814cd0c9883619be7420dbf45a116a2edb9b4687640db14b059a

Contents?: true

Size: 751 Bytes

Versions: 18

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

describe Cany do
  context '#setup' do
    it 'should require a .canspec file' do
      expect { Cany::setup File.expand_path('../fixtures/empty', __FILE__) }.to raise_error(Cany::MissingSpecification)
    end
  end

  it 'should stop on multiple .canspec files' do
    expect { Cany::setup File.expand_path('../fixtures/multiple', __FILE__) }.to raise_error Cany::MultipleSpecifications, /Multiple canspec found in .*/
  end

  it 'should load a .canspec file' do
    spec = Cany::setup File.expand_path('../fixtures/single', __FILE__)
    expect(spec).to be_an_instance_of Cany::Specification
    expect(spec.name).to eq 'single-test'
    expect(spec.base_dir).to eq File.expand_path('../fixtures/single', __FILE__)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cany-0.5.7 spec/cany_spec.rb
cany-0.5.6 spec/cany_spec.rb
cany-0.5.5 spec/cany_spec.rb
cany-0.5.4 spec/cany_spec.rb
cany-0.5.3 spec/cany_spec.rb
cany-0.5.2 spec/cany_spec.rb
cany-0.5.1 spec/cany_spec.rb
cany-0.5.0 spec/cany_spec.rb
cany-0.4.0 spec/cany_spec.rb
cany-0.3.0 spec/cany_spec.rb
cany-0.2.1 spec/cany_spec.rb
cany-0.2.0 spec/cany_spec.rb
cany-0.1.3 spec/cany_spec.rb
cany-0.1.2 spec/cany_spec.rb
cany-0.1.1 spec/cany_spec.rb
cany-0.1.0 spec/cany_spec.rb
cany-0.0.2 spec/cany_spec.rb
cany-0.0.1 spec/cany_spec.rb