Sha256: 5404b6f04592c62721f15852147b9826ef97d6589e9a6f53439f8eef91ea7d63
Contents?: true
Size: 919 Bytes
Versions: 7
Compression:
Stored size: 919 Bytes
Contents
require 'albacore/dsl' require 'spec_helper' describe "what methods are included by default" do require 'albacore' class A ; include Albacore::DSL ; end subject { A.new.method(:sh).to_s } it { should include("Albacore::CrossPlatformCmd") } end class X include Albacore::DSL end #puts "X has methods: #{X.new.private_methods.inspect}" %w[nugets_restore nugets_pack asmver build].each do |sym| method = :"#{sym}" describe "that #{method}(*args, &block) is included when doing `require 'albacore'`" do subject do X.new end it do expect(subject.method(method)).to_not be nil end end end describe 'calling dsl method without symbol name' do subject do x = X.new # calling the #build method in the dsl without any name should name it x.method(:build).call do |b| end end it 'should be named "build"' do expect(subject.name).to eq('build') end end
Version data entries
7 entries across 7 versions & 1 rubygems