test/test_jeweler.rb in jeweler-1.2.1 vs test/test_jeweler.rb in jeweler-1.3.0

- old
+ new

@@ -46,10 +46,15 @@ jeweler = build_jeweler(non_git_dir_path) assert ! jeweler.in_git_repo?, "jeweler doesn't know that #{jeweler.base_dir} is not a git repository" end + should "find the base repo" do + jeweler = build_jeweler(File.dirname(File.expand_path(__FILE__))) + assert_equal File.dirname(File.dirname(File.expand_path(__FILE__))), jeweler.git_base_dir + end + should "build and run write gemspec command when writing gemspec" do jeweler = build_jeweler command = Object.new mock(command).run @@ -120,27 +125,39 @@ command = Object.new mock(command).run mock(command).major=(1) mock(command).minor=(5) mock(command).patch=(2) + mock(command).build=('a1') mock(Jeweler::Commands::Version::Write).build_for(jeweler) { command } - jeweler.write_version(1, 5, 2) + jeweler.write_version(1, 5, 2, 'a1') end - should "build and run release command when running release" do + should "build and run release to github command when running release_gem_to_github" do jeweler = build_jeweler command = Object.new mock(command).run - mock(Jeweler::Commands::Release).build_for(jeweler) { command } + mock(Jeweler::Commands::ReleaseToGithub).build_for(jeweler) { command } - jeweler.release + jeweler.release_gem_to_github end + should "build and run release to git command when running release_to_git" do + jeweler = build_jeweler + + command = Object.new + mock(command).run + + mock(Jeweler::Commands::ReleaseToGit).build_for(jeweler) { command } + + jeweler.release_to_git + end + should "build and run release to rubyforge command when running release to rubyforge" do jeweler = build_jeweler command = Object.new mock(command).run @@ -163,12 +180,8 @@ assert_respond_to build_jeweler, :repo end should "respond to commit" do assert_respond_to build_jeweler, :commit - end - - should "respond to rubyforge" do - assert_respond_to build_jeweler, :rubyforge end end