spec/spec_helper.rb in table_go-0.1.9 vs spec/spec_helper.rb in table_go-0.2.0
- old
+ new
@@ -1,19 +1,21 @@
require 'rubygems'
require 'bundler/setup'
-require 'rails'
-require 'rspec-rails'
+# require 'rails'
+require 'rspec'
require 'action_controller'
# require 'active_model'
require 'ostruct'
require 'table_go'
+require 'haml'
# require 'pry'
RSpec.configure do |config|
- # some (optional) config here
end
+
+
class String
def cleanup_html
self.gsub(/\n/,'').gsub(/>\s*</, "><").strip
end
@@ -28,8 +30,11 @@
extend ActiveModel::Translation
def self.column_names
[:ident, :title, :date_of_order, :vat, :price, :xmas_bonus, :my_type]
end
-
end
+
+def read_file_from_fixtures_path(file)
+ File.read(File.dirname(__FILE__) + '/fixtures/%s' % file)
+end
\ No newline at end of file