Skip to content

Commit

Permalink
added spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 22, 2014
1 parent 6e2f2e5 commit 6bb1bcc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/core/tdiary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
it "include misc path into load path" do
expect(@loaded_paths).to be_include @root_path + '/misc/lib'
end

context 'append gem' do
it "include append gem path into load path" do
expect(@loaded_paths).to be_include @root_path + '/misc/lib/foo-0.0.1/lib'
end
end
end
end
7 changes: 7 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@
end
end

# need to prepare before require 'tdiary'
FileUtils.mkdir_p File.expand_path(File.dirname(__FILE__) + '/..') + '/misc/lib/foo-0.0.1/lib'

require 'tdiary'

RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect
end

config.after(:suite) do
FileUtils.rm_rf File.expand_path(File.dirname(__FILE__) + '/..') + '/misc/lib/foo-0.0.1'
end
end

class DummyTDiary
Expand Down

0 comments on commit 6bb1bcc

Please sign in to comment.