squint 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
-
3
- one:
4
- title: MyString
5
- body: MyString
6
- request_info:
7
- properties:
8
-
9
- two:
10
- title: MyString
11
- body: MyString
12
- request_info:
13
- properties:
@@ -1,17 +0,0 @@
1
- require 'test_helper'
2
-
3
- class PostTest < ActiveSupport::TestCase
4
- [:request_info, :properties].each do |prop_name|
5
- test "generates SQL for #{prop_name}" do
6
- sql_string = Post.where(prop_name => { referer: "http://example.com/one" } ).to_sql
7
- puts sql_string
8
- assert_match(/\"posts\".\"#{prop_name}\"-[>]{1,2}\'referer\'/, sql_string)
9
- end
10
-
11
- test "finds records for #{prop_name}" do
12
- reln = Post.where(prop_name => { referer: "http://example.com/one" } )
13
- puts reln.to_sql
14
- assert_equal 1,reln.count
15
- end
16
- end
17
- end
@@ -1,59 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuite time='0.352930' skipped='0' failures='0' errors='0' name="SquintTest" assertions='31' tests='28'>
3
- <testcase time='0.028566' file="test/squint_test.rb" name="test_finds_records_for_request_info_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
4
- </testcase>
5
- <testcase time='0.011271' file="test/squint_test.rb" name="test_generates_SQL_for_request_info" assertions='2'>
6
- </testcase>
7
- <testcase time='0.010728' file="test/squint_test.rb" name="test_detects_present_integer_storext_hstore_attributes" assertions='1'>
8
- </testcase>
9
- <testcase time='0.021516' file="test/squint_test.rb" name="test_handles_multiple_non-hash_parameters" assertions='1'>
10
- </testcase>
11
- <testcase time='0.011792' file="test/squint_test.rb" name="test_handles_string_parameters" assertions='1'>
12
- </testcase>
13
- <testcase time='0.010496' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated" assertions='1'>
14
- </testcase>
15
- <testcase time='0.010163' file="test/squint_test.rb" name="test_finds_records_for_properties_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
16
- </testcase>
17
- <testcase time='0.009402' file="test/squint_test.rb" name="test_finds_records_for_properties_populated" assertions='1'>
18
- </testcase>
19
- <testcase time='0.014218' file="test/squint_test.rb" name="test_with_find_by_lotsa_things" assertions='0'>
20
- </testcase>
21
- <testcase time='0.011102' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array_including_nil" assertions='1'>
22
- </testcase>
23
- <testcase time='0.010788' file="test/squint_test.rb" name="test_generates_SQL_for_properties" assertions='2'>
24
- </testcase>
25
- <testcase time='0.009354' file="test/squint_test.rb" name="test_detects_present_storext_jsonb_attributes" assertions='1'>
26
- </testcase>
27
- <testcase time='0.011362' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array" assertions='1'>
28
- </testcase>
29
- <testcase time='0.013916' file="test/squint_test.rb" name="test_detects_present_integer_storext_jsonb_attributes" assertions='1'>
30
- </testcase>
31
- <testcase time='0.011390' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_properties_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
32
- </testcase>
33
- <testcase time='0.011049' file="test/squint_test.rb" name="test_detects_default_integer_storext_hstore_attributes" assertions='1'>
34
- </testcase>
35
- <testcase time='0.009786' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_request_info_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
36
- </testcase>
37
- <testcase time='0.010156' file="test/squint_test.rb" name="test_finds_records_for_properties_with_nil" assertions='1'>
38
- </testcase>
39
- <testcase time='0.012279' file="test/squint_test.rb" name="test_finds_records_for_request_info_with_nil" assertions='1'>
40
- </testcase>
41
- <testcase time='0.011525' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_one_where" assertions='2'>
42
- </testcase>
43
- <testcase time='0.011909' file="test/squint_test.rb" name="test_detects_default_integer_storext_jsonb_attributes" assertions='1'>
44
- </testcase>
45
- <testcase time='0.011461' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array" assertions='1'>
46
- </testcase>
47
- <testcase time='0.010520' file="test/squint_test.rb" name="test_detects_default_storext_hstore_attributes" assertions='1'>
48
- </testcase>
49
- <testcase time='0.016903' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_hstore_attributes" assertions='1'>
50
- </testcase>
51
- <testcase time='0.011545' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_jsonb_attributes" assertions='1'>
52
- </testcase>
53
- <testcase time='0.011194' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array_including_nil" assertions='1'>
54
- </testcase>
55
- <testcase time='0.012636' file="test/squint_test.rb" name="test_detects_default_storext_jsonb_attributes" assertions='1'>
56
- </testcase>
57
- <testcase time='0.015901' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_multiple_wheres" assertions='2'>
58
- </testcase>
59
- </testsuite>
@@ -1,20 +0,0 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
- ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
- require "rails/test_help"
7
-
8
- # Filter out Minitest backtrace while allowing backtrace from other libraries
9
- # to be shown.
10
- Minitest.backtrace_filter = Minitest::BacktraceFilter.new
11
-
12
- # Load support files
13
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
14
-
15
- # Load fixtures from the engine
16
- if ActiveSupport::TestCase.respond_to?(:fixture_path=)
17
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
18
- ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
19
- ActiveSupport::TestCase.fixtures :all
20
- end