active_model_exporters 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +0,0 @@
1
- require 'test_helper'
2
-
3
- module ActiveModel
4
- class Exporter::CSV
5
- class LocaleHeadersTest < Minitest::Test
6
- def setup
7
- @collection = [
8
- ARUser.new(first_name: 'ARFoo1', last_name: 'ARBar1'),
9
- ARUser.new(first_name: 'ARFoo2', last_name: 'ARBar2'),
10
- ARUser.new(first_name: 'ARFoo3', last_name: 'ARBar3')
11
- ]
12
- end
13
-
14
- def test_locale_headers
15
- exporter = ActiveModel::ArrayExporter.new(@collection)
16
- assert_equal "First,Last\n"\
17
- "ARFoo1,ARBar1\n"\
18
- "ARFoo2,ARBar2\n"\
19
- "ARFoo3,ARBar3\n", exporter.to_csv
20
- end
21
- end
22
- end
23
- end
@@ -1,31 +0,0 @@
1
- require 'coveralls'
2
- Coveralls.wear!
3
-
4
- require 'simplecov'
5
- SimpleCov.start
6
-
7
- require 'ostruct'
8
- require 'action_controller'
9
- require 'active_model_exporters'
10
- require 'minitest/autorun'
11
- require 'minitest/unit'
12
- require 'minitest/pride'
13
- require 'fixtures/locale'
14
- require 'fixtures/models'
15
- require 'fixtures/exporters'
16
- require 'fixtures/active_record/models'
17
- require 'fixtures/active_record/exporters'
18
-
19
- ActiveSupport::TestCase.test_order = :random
20
-
21
- module TestHelper
22
- Routes = ActionDispatch::Routing::RouteSet.new
23
- Routes.draw do get ':controller(/:action)' end
24
- ActionController::Base.send(:include, Routes.url_helpers)
25
- end
26
-
27
- class ActionController::TestCase
28
- def setup
29
- @routes = TestHelper::Routes
30
- end
31
- end