Sha256: 0811af4a4d0a3ee72fd4724c092db49d68383ca77ea734f46b89824a9b503682

Contents?: true

Size: 967 Bytes

Versions: 3

Compression:

Stored size: 967 Bytes

Contents

require 'spec_helper'
require 'appraisal/appraisal'

describe Appraisal::Appraisal do
  it "creates a proper bundle command" do
    appraisal = Appraisal::Appraisal.new('fake', 'fake')
    appraisal.stub(:gemfile_path).and_return("/home/test/test directory")

    appraisal.bundle_command.should == "bundle check --gemfile='/home/test/test directory' || bundle install --gemfile='/home/test/test directory'"
  end

  it "converts spaces to underscores in the gemfile path" do
    appraisal = Appraisal::Appraisal.new("one two", "Gemfile")
    appraisal.gemfile_path.should =~ /one_two\.gemfile$/
  end

  it "converts  punctuation to underscores in the gemfile path" do
    appraisal = Appraisal::Appraisal.new("o&ne!", "Gemfile")
    appraisal.gemfile_path.should =~ /o_ne_\.gemfile$/
  end

  it "keeps dots in the gemfile path" do
    appraisal = Appraisal::Appraisal.new("rails3.0", "Gemfile")
    appraisal.gemfile_path.should =~ /rails3\.0\.gemfile$/
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/appraisal-0.5.1/spec/appraisal/appraisal_spec.rb
appraisal-0.5.2 spec/appraisal/appraisal_spec.rb
appraisal-0.5.1 spec/appraisal/appraisal_spec.rb