Sha256: af9914d7a10ff25a422e604496e2a6289f0ce400515cf1a60f143a9beec537e5

Contents?: true

Size: 831 Bytes

Versions: 13

Compression:

Stored size: 831 Bytes

Contents

# encoding: utf-8

require_relative "../../spec_helper"
require "nake/tasks/bundle"

describe "Task bundle" do
  before(:each) do
    @task = Nake::Task[:bundle]
    @bundler = Object.new.define_singleton_method(:invoke) { |*args| args }
    @task.define_singleton_method(:bundler) { @bundler }
  end

  it "should invoke bundler with --cached by default" do
    @task.call.should include("--cached")
  end

  it "should invoke bundler without --cached if --no-cached argument is provided" do
    @task.call(cached: false).should_not include("--cached")
  end

  it "should not pass --no-cached argument to bundler" do
    @task.call(cached: false).should_not include("--no-cached")
  end

  it "should pass all other arguments to bundler" do
    @task.call("--only", "development").should eql(["--only", "development"])
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
nake-0.1.1 spec/nake/tasks/bundle_spec.rb
nake-0.1 spec/nake/tasks/bundle_spec.rb
nake-0.0.9.5 spec/nake/tasks/bundle_spec.rb
nake-0.0.9.4 spec/nake/tasks/bundle_spec.rb
nake-0.0.9.3 spec/nake/tasks/bundle_spec.rb
nake-0.0.9.2 spec/nake/tasks/bundle_spec.rb
nake-0.0.9.pre spec/nake/tasks/bundle_spec.rb
do_riak-0.10.1.pre gems/gems/nake-0.0.8/spec/nake/tasks/bundle_spec.rb
nake-0.0.8.pre spec/nake/tasks/bundle_spec.rb
nake-0.0.8 spec/nake/tasks/bundle_spec.rb
nake-0.0.7 spec/nake/tasks/bundle_spec.rb
nake-0.0.6 spec/nake/tasks/bundle_spec.rb
nake-0.0.5 spec/nake/tasks/bundle_spec.rb