Sha256: 5af2cf0c205fcf06bef024fd825f72133528acb9515fa5b2481140881f6f65ea

Contents?: true

Size: 785 Bytes

Versions: 6

Compression:

Stored size: 785 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'rspec'
require 'action_controller'
require 'ostruct'
require 'table_go'
require 'haml'
# require 'pry'

RSpec.configure do |config|
end



class String
  def cleanup_html
    self.gsub(/\n/,'').gsub(/>\s*</, "><").strip
  end

  def cleanup_csv
    self.strip.gsub(/\n\s*/, "\n")
  end
end


class Article < OpenStruct
  extend ActiveModel::Naming
  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

def action_view_instance
  ActionView::Base.new.tap do |view|
    view.output_buffer = ActiveSupport::SafeBuffer.new rescue ''
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
table_go-0.2.6 spec/spec_helper.rb
table_go-0.2.5 spec/spec_helper.rb
table_go-0.2.4 spec/spec_helper.rb
table_go-0.2.3 spec/spec_helper.rb
table_go-0.2.2 spec/spec_helper.rb
table_go-0.2.1 spec/spec_helper.rb