spec/spec_helper.rb in hotcell-0.0.1 vs spec/spec_helper.rb in hotcell-0.1.0
- old
+ new
@@ -7,11 +7,11 @@
cast = :hotcell_node if object.is_a?(Hotcell::Node)
cast
end
def awesome_hotcell_node(object)
- "#{colorize(object.class.name, :class)} #{colorize(object.name.to_s, :method)}" +
+ "#{colorize(object.class.to_s, :class)} #{colorize(object.name.to_s, :method)}" +
((awesome_hash(object.options) + "\n") if object.options.present?).to_s +
awesome_array(object.children)
end
alias_method_chain :cast, :hotcell_node
@@ -26,11 +26,15 @@
"expected:\n#{expected.ai(raw: true, indent: 2)}\ngot:\n#{actual.ai(raw: true, indent: 2)}"
end
end
RSpec.configure do |config|
+ def data_path name
+ File.join(File.dirname(__FILE__), 'data', name)
+ end
+
def data name
- File.read File.join(File.dirname(__FILE__), 'data', name)
+ File.read data_path(name)
end
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus