spec/methods_examples.rb in data_paths-0.2.1 vs spec/methods_examples.rb in data_paths-0.3.0.rc1
- old
+ new
@@ -4,27 +4,27 @@
require 'helpers/data'
shared_examples_for "Methods" do
before(:all) do
Helpers::DATA_DIRS.each do |dir|
- @context.register_data_dir dir
+ subject.register_data_path dir
end
end
it "should list data directories" do
Helpers::DATA_DIRS.each do |dir|
- @context.data_paths.should include(dir)
+ subject.data_paths.should include(dir)
end
end
it "should prevent the addition of non-existant directories" do
lambda {
- @context.register_data_dir 'lol'
+ subject.register_data_path 'lol'
}.should raise_error(RuntimeError)
end
it "should prevent the addition of non-directories" do
lambda {
- @context.register_data_dir __FILE__
+ subject.register_data_path __FILE__
}.should raise_error(RuntimeError)
end
end