Skip to content

Commit

Permalink
2 missing spec fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
James McCarthy committed Aug 17, 2016
1 parent 733608d commit 03888f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/lib/seedbank/dsl_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@

it 'sets Rake Task description' do
Seedbank::DSL.define_seed_task(seed_file, task_name => dependencies)
relative_file = Pathname.new(seed_file).relative_path_from(Rails.root)

Rake::Task[task_name].comment.must_equal "Load the seed data from #{seed_file}"
Rake::Task[task_name].comment.must_equal "Load the seed data from #{relative_file}"
end

it 'sets Rake Task action to the seed_file contents' do
Expand Down
2 changes: 1 addition & 1 deletion test/lib/tasks/seed_rake_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def self.glob_dummy_seeds
def setup
main = TOPLEVEL_BINDING.eval('class << self; self; end')
orig = original_seeds_file
main.send(:undef_method, :original_seeds_file)
main.send(:undef_method, :original_seeds_file) if main.respond_to?(:original_seeds_file, true)
main.send(:define_method, :original_seeds_file) { nil }
super
main.send(:undef_method, :original_seeds_file)
Expand Down

0 comments on commit 03888f0

Please sign in to comment.