Skip to content

Commit

Permalink
Test for gemspec DSL method evaluating inside gemspec dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Arko and Terence Lee committed Jan 18, 2011
1 parent 2bf0911 commit e517d6f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/install/gemspec_spec.rb
Expand Up @@ -93,4 +93,16 @@
should_be_installed "bar-dev 1.0.0", :groups => :dev
end

it "should evaluate the gemspec in its directory" do
build_lib("foo", :path => tmp.join("foo"))
File.open(tmp.join("foo/foo.gemspec"), "w") do |s|
s.write "raise 'ahh' unless Dir.pwd == '#{tmp.join("foo")}'"
end

install_gemfile <<-G, :expect_err => true
gemspec :path => '#{tmp.join("foo")}'
G
@err.should_not match(/ahh/)
end

end

0 comments on commit e517d6f

Please sign in to comment.