spec/unit/doc_manager/test_call.rb in alf-shell-0.13.1 vs spec/unit/doc_manager/test_call.rb in alf-shell-0.14.0
- old
+ new
@@ -10,33 +10,31 @@
}
describe "on a static file" do
before{
def dm.find_file(cmd);
- File.expand_path('../static.md', __FILE__)
+ Path.dir/'static.md'
end
}
it { should eq("Hello\n") }
end
describe "on a dynamic file" do
before{
def dm.find_file(cmd);
- File.expand_path('../dynamic.md', __FILE__)
+ Path.dir/'dynamic.md'
end
}
it { should eq("show\n") }
end
- unless RUBY_VERSION < "1.9"
- describe "on an example file" do
- before{
- def dm.find_file(cmd);
- File.expand_path('../example.md', __FILE__)
- end
- }
- it { should eq(File.read(File.expand_path('../example_1.txt', __FILE__))) }
- end
+ describe "on an example file" do
+ before{
+ def dm.find_file(cmd);
+ Path.dir/'example.md'
+ end
+ }
+ it { should eq((Path.dir/"example_1.txt").read) }
end
end
end
end