clndr-rails 1.2.10.1 → 1.4.6.1.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +10 -10
  3. data/lib/clndr-rails.rb +230 -230
  4. data/lib/clndr-rails/config.rb +114 -114
  5. data/lib/clndr-rails/errors.rb +19 -19
  6. data/lib/clndr-rails/templates.rb +94 -94
  7. data/lib/clndr-rails/version.rb +1 -1
  8. data/test/dummy/config/initializers/clndr.rb +27 -27
  9. data/test/dummy/log/test.log +372 -16927
  10. data/test/dummy/spec/controllers/base_controller_spec.rb +12 -12
  11. data/test/dummy/spec/spec_helper.rb +93 -93
  12. data/test/spec/clndr-rails_spec.rb +28 -28
  13. data/test/spec/configuration_spec.rb +136 -136
  14. data/test/spec/events_spec.rb +62 -62
  15. data/test/spec/html_spec.rb +199 -199
  16. data/test/spec/spec_helper.rb +15 -15
  17. data/test/spec/templates_spec.rb +70 -70
  18. data/vendor/assets/javascripts/clndr-rails/clndr.min.js +2 -2
  19. metadata +26 -246
  20. data/test/dummy/db/development.sqlite3 +0 -0
  21. data/test/dummy/log/development (/320/232/320/276/320/275/321/204/320/273/320/270/320/272/321/202/321/203/321/216/321/211/320/260/321/217 /320/272/320/276/320/277/320/270/321/217 /321/201 /320/272/320/276/320/274/320/277/321/214/321/216/321/202/320/265/321/200/320/260 DELTAPC2 2014-12-25).log" +0 -19726
  22. data/test/dummy/log/development.log +0 -22099
  23. data/test/dummy/tmp/cache/assets/development/sass/7c98d0fae9192743d8c55a5e8e53de41ac6246a9/clndr-rails.css.scssc +0 -0
  24. data/test/dummy/tmp/cache/assets/development/sprockets/003c68cd1f3ba2d6344147bb52d8fd1a +0 -0
  25. data/test/dummy/tmp/cache/assets/development/sprockets/02c5e1a21d4a4605f8b34eca639a1f70 +0 -0
  26. data/test/dummy/tmp/cache/assets/development/sprockets/0687b70ce11a7e80dcd39da365dd5a8a +0 -0
  27. data/test/dummy/tmp/cache/assets/development/sprockets/08b993c8e83ad57a4ecb8d753b4620d5 +0 -0
  28. data/test/dummy/tmp/cache/assets/development/sprockets/1223ac7ac3a460c3f9ce66e828acdc67 +0 -0
  29. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  30. data/test/dummy/tmp/cache/assets/development/sprockets/1cc60160d9e0a352994b8eb6b8313b1a +0 -0
  31. data/test/dummy/tmp/cache/assets/development/sprockets/1d658adc7cb09c209c423c9138dbacee +0 -0
  32. data/test/dummy/tmp/cache/assets/development/sprockets/28cfd59c37a42a9ea808d622b0177c86 +0 -0
  33. data/test/dummy/tmp/cache/assets/development/sprockets/2aeab94961f3936633223fba03e2a6ed +0 -0
  34. data/test/dummy/tmp/cache/assets/development/sprockets/2be3a826c076d8c8854c94ebc3a6d773 +0 -0
  35. data/test/dummy/tmp/cache/assets/development/sprockets/2e471d0b6fa1aa6817c6d3e773648a43 +0 -0
  36. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  37. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  38. data/test/dummy/tmp/cache/assets/development/sprockets/3b526052e48eb4ad5375fb6432761828 +0 -0
  39. data/test/dummy/tmp/cache/assets/development/sprockets/4069980b5689edf29f7bc438d62f44e9 +0 -0
  40. data/test/dummy/tmp/cache/assets/development/sprockets/42927f6bcf2f320e08ea8ff02d5c8209 +0 -0
  41. data/test/dummy/tmp/cache/assets/development/sprockets/433724373619c6185a095523fd7c7fe0 +0 -0
  42. data/test/dummy/tmp/cache/assets/development/sprockets/460632c7db14d41cf7371b6b4bb64157 +0 -0
  43. data/test/dummy/tmp/cache/assets/development/sprockets/486f42c6c97c7a42b88dc91fc2d5a864 +0 -0
  44. data/test/dummy/tmp/cache/assets/development/sprockets/4a9158fb3a677a8253fa2a7e93551175 +0 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/4ad6cd41e5b645f9ceef10b1e3baea77 +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/4b2e05f2b06345dfee1d683a3fdd29e7 +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/51408facf1bc7598eedca202daf4ba96 +0 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/53eedf0ac9053fc3d462eabaf534bd05 +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/580892b79dd41de64c62d07404cd1a12 +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/58dc697381035be4d343e2b19720c10c +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/5a6cb5cfc573c611e29c2ac98103701f +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/5f78b3457def1d02bd3fb75d4e0cfb63 +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/643ff98d256ca160a0cb4ca0fc83ffdb +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/684604af0ae58f9e55f2992fe9c466d7 +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/6b158f7584f499d82165f5ccaf303d16 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/6c33e774b86f9ef5ba24ffbe52bed674 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/6c9c1cfb50b40b88dd14926792400890 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/6f78527844795b9b46156d0576fffe63 +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/73938775f2e5bebe09996667ea3dd302 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/74efa8b198344d1b86c6531144584f3e +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/78573c83ee7596aaed9105a0ed816f5d +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/7b51783beb0f6f17617f87ef5d2688e3 +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/7b60bb572e6a268c62e728ed79fb2cda +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/82eac1b4407ccfbc517558b830c67a53 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/8329b2874924fc312c31e87ef69a88bb +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/83ed9f0dcdd68efbed721b2b10fcda6b +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/9123d280fa9cc0d16a1ec96a3e44bcc1 +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/93120bd88f1e2293fc55c191aeab678a +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/9334f44096c23e8904784b524e6ae750 +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/954c1c7328e5b9c43abd84f4981286c7 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/9bd8392ddf2b52be4b455e52a628d169 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/9c89c900cca1bf92a5f29c304d323256 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/9e158358644b7e1cbee43defd7d7b449 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/a086b63b827c2bdef684cc4985c925fc +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/a4ce04494de7990c1b23b8498b2fb743 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/a62be18dea33018456ea9b72b4a9e10b +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/a780ea7d8044a1786c8bfd4b3df13491 +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/a7f1637ae79393f95fd20936e91d62d0 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/ab8a19b4c942c018374d61f4f99235dc +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/ad861213dbd41ab02600f740c9bb1dee +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/ae0ae68c837285b67a4fc1df4dddb939 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/b419fd5d14fd53ae2fffa3026f0f4aa4 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/b6c986125db42513425f8a84e0021579 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/b85bb5a9001b8d932b99e152afc282b9 +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/bb2f6a70a78dd0eb8181c7f495e82f57 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/bd28ee35f981cb10b9740ee6e6686b6d +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/be9637deb767f91f0193d4b0573f954e +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/c0f2a7bdc7a73db8bacf633cef4ec428 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/c4a0410f3ca8e859238c3b5a24ef0d98 +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/c744c093e347d6c90bc75206f502a48e +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/c7effad0605334daea2929e656094580 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/c8fc1f981896d3bc3650f6dc2cdc3981 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/cbc61fb8910e489328c2cbf64a73c6ca +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/cc517e4ba5ef452b08d1ab48925b952d +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/d9282682f846f5b479288a298788e6c7 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/dc767a0bb27fb390899cd7e6ff34b310 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/dd041a66875b6a140cf105a32e88980b +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/de1001d906d7f009cc8b325d53aed152 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/de79a0cce913cf585100d02ad7b13bd2 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/e101b6a9f9eb86d3591c6075a3f59be4 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/e59e1f3e795e9486fffbc3b4ad0baaca +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/e7296c70ca399cdcc73806b4a9481fde +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/eabe02c282ba47d5bef91a603f0e8ddc +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/edf2dce367a4fbd2628ceef059dab88f +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/efbbf60292a32f735cfdcbd98f0a0dcb +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/f1829681b5124c696fef4fd62c36f101 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/f34be083c250d77494ecd0d35fd1099f +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/f3c1e7e2d789b88a0b3e967365eefda2 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/f56ceda2003be471c5e7a5ec2e355c9e +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/fb5e937723a7579bee0be03b0c5d9052 +0 -0
  114. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  115. data/test/dummy/tmp/cache/assets/test/sprockets/1cc60160d9e0a352994b8eb6b8313b1a +0 -0
  116. data/test/dummy/tmp/cache/assets/test/sprockets/28cfd59c37a42a9ea808d622b0177c86 +0 -0
  117. data/test/dummy/tmp/cache/assets/test/sprockets/2aeab94961f3936633223fba03e2a6ed +0 -0
  118. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  119. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  120. data/test/dummy/tmp/cache/assets/test/sprockets/42927f6bcf2f320e08ea8ff02d5c8209 +0 -0
  121. data/test/dummy/tmp/cache/assets/test/sprockets/53eedf0ac9053fc3d462eabaf534bd05 +0 -0
  122. data/test/dummy/tmp/cache/assets/test/sprockets/580892b79dd41de64c62d07404cd1a12 +0 -0
  123. data/test/dummy/tmp/cache/assets/test/sprockets/5a6cb5cfc573c611e29c2ac98103701f +0 -0
  124. data/test/dummy/tmp/cache/assets/test/sprockets/5f78b3457def1d02bd3fb75d4e0cfb63 +0 -0
  125. data/test/dummy/tmp/cache/assets/test/sprockets/684604af0ae58f9e55f2992fe9c466d7 +0 -0
  126. data/test/dummy/tmp/cache/assets/test/sprockets/6c33e774b86f9ef5ba24ffbe52bed674 +0 -0
  127. data/test/dummy/tmp/cache/assets/test/sprockets/6f78527844795b9b46156d0576fffe63 +0 -0
  128. data/test/dummy/tmp/cache/assets/test/sprockets/74efa8b198344d1b86c6531144584f3e +0 -0
  129. data/test/dummy/tmp/cache/assets/test/sprockets/bb2f6a70a78dd0eb8181c7f495e82f57 +0 -0
  130. data/test/dummy/tmp/cache/assets/test/sprockets/c8fc1f981896d3bc3650f6dc2cdc3981 +0 -0
  131. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  132. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  133. data/test/dummy/tmp/cache/assets/test/sprockets/de79a0cce913cf585100d02ad7b13bd2 +0 -0
  134. data/test/dummy/tmp/cache/assets/test/sprockets/f1829681b5124c696fef4fd62c36f101 +0 -0
  135. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
@@ -1,12 +1,12 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe BaseController, :type => :controller do
4
-
5
- describe "GET index" do
6
- it "returns http success" do
7
- get :index
8
- expect(response).to have_http_status(:success)
9
- end
10
- end
11
-
12
- end
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe BaseController, :type => :controller do
4
+
5
+ describe "GET index" do
6
+ it "returns http success" do
7
+ get :index
8
+ expect(response).to have_http_status(:success)
9
+ end
10
+ end
11
+
12
+ end
@@ -1,93 +1,93 @@
1
- # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
5
- #
6
- # Given that it is always loaded, you are encouraged to keep this file as
7
- # light-weight as possible. Requiring heavyweight dependencies from this file
8
- # will add to the boot time of your test suite on EVERY test run, even for an
9
- # individual file that may not need all of that loaded. Instead, consider making
10
- # a separate helper file that requires the additional dependencies and performs
11
- # the additional setup, and require it from the spec files that actually need it.
12
- #
13
- # The `.rspec` file also contains a few flags that are not defaults but that
14
- # users commonly want.
15
- #
16
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
- require 'capybara/rspec'
18
- require 'capybara/webkit/matchers'
19
- Capybara.javascript_driver = :webkit
20
-
21
-
22
- RSpec.configure do |config|
23
-
24
- # rspec-expectations config goes here. You can use an alternate
25
- # assertion/expectation library such as wrong or the stdlib/minitest
26
- # assertions if you prefer.
27
- config.expect_with :rspec do |expectations|
28
- # This option will default to `true` in RSpec 4. It makes the `description`
29
- # and `failure_message` of custom matchers include text for helper methods
30
- # defined using `chain`, e.g.:
31
- # be_bigger_than(2).and_smaller_than(4).description
32
- # # => "be bigger than 2 and smaller than 4"
33
- # ...rather than:
34
- # # => "be bigger than 2"
35
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
36
- end
37
-
38
- # rspec-mocks config goes here. You can use an alternate test double
39
- # library (such as bogus or mocha) by changing the `mock_with` option here.
40
- config.mock_with :rspec do |mocks|
41
- # Prevents you from mocking or stubbing a method that does not exist on
42
- # a real object. This is generally recommended, and will default to
43
- # `true` in RSpec 4.
44
- mocks.verify_partial_doubles = true
45
- config.include Capybara::DSL
46
- config.include(Capybara::Webkit::RspecMatchers, :type => :feature)
47
- end
48
-
49
- # The settings below are suggested to provide a good initial experience
50
- # with RSpec, but feel free to customize to your heart's content.
51
- =begin
52
- # These two settings work together to allow you to limit a spec run
53
- # to individual examples or groups you care about by tagging them with
54
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
55
- # get run.
56
- config.filter_run :focus
57
- config.run_all_when_everything_filtered = true
58
-
59
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
60
- # For more details, see:
61
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
63
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
64
- config.disable_monkey_patching!
65
-
66
- # Many RSpec users commonly either run the entire suite or an individual
67
- # file, and it's useful to allow more verbose output when running an
68
- # individual spec file.
69
- if config.files_to_run.one?
70
- # Use the documentation formatter for detailed output,
71
- # unless a formatter has already been configured
72
- # (e.g. via a command-line flag).
73
- config.default_formatter = 'doc'
74
- end
75
-
76
- # Print the 10 slowest examples and example groups at the
77
- # end of the spec run, to help surface which specs are running
78
- # particularly slow.
79
- config.profile_examples = 10
80
-
81
- # Run specs in random order to surface order dependencies. If you find an
82
- # order dependency and want to debug it, you can fix the order by providing
83
- # the seed, which is printed after each run.
84
- # --seed 1234
85
- config.order = :random
86
-
87
- # Seed global randomization in this process using the `--seed` CLI option.
88
- # Setting this allows you to use `--seed` to deterministically reproduce
89
- # test failures related to randomization by passing the same `--seed` value
90
- # as the one that triggered the failure.
91
- Kernel.srand config.seed
92
- =end
93
- end
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ require 'capybara/rspec'
18
+ require 'capybara/webkit/matchers'
19
+ Capybara.javascript_driver = :webkit
20
+
21
+
22
+ RSpec.configure do |config|
23
+
24
+ # rspec-expectations config goes here. You can use an alternate
25
+ # assertion/expectation library such as wrong or the stdlib/minitest
26
+ # assertions if you prefer.
27
+ config.expect_with :rspec do |expectations|
28
+ # This option will default to `true` in RSpec 4. It makes the `description`
29
+ # and `failure_message` of custom matchers include text for helper methods
30
+ # defined using `chain`, e.g.:
31
+ # be_bigger_than(2).and_smaller_than(4).description
32
+ # # => "be bigger than 2 and smaller than 4"
33
+ # ...rather than:
34
+ # # => "be bigger than 2"
35
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
36
+ end
37
+
38
+ # rspec-mocks config goes here. You can use an alternate test double
39
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
40
+ config.mock_with :rspec do |mocks|
41
+ # Prevents you from mocking or stubbing a method that does not exist on
42
+ # a real object. This is generally recommended, and will default to
43
+ # `true` in RSpec 4.
44
+ mocks.verify_partial_doubles = true
45
+ config.include Capybara::DSL
46
+ config.include(Capybara::Webkit::RspecMatchers, :type => :feature)
47
+ end
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ =begin
52
+ # These two settings work together to allow you to limit a spec run
53
+ # to individual examples or groups you care about by tagging them with
54
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
55
+ # get run.
56
+ config.filter_run :focus
57
+ config.run_all_when_everything_filtered = true
58
+
59
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
63
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
64
+ config.disable_monkey_patching!
65
+
66
+ # Many RSpec users commonly either run the entire suite or an individual
67
+ # file, and it's useful to allow more verbose output when running an
68
+ # individual spec file.
69
+ if config.files_to_run.one?
70
+ # Use the documentation formatter for detailed output,
71
+ # unless a formatter has already been configured
72
+ # (e.g. via a command-line flag).
73
+ config.default_formatter = 'doc'
74
+ end
75
+
76
+ # Print the 10 slowest examples and example groups at the
77
+ # end of the spec run, to help surface which specs are running
78
+ # particularly slow.
79
+ config.profile_examples = 10
80
+
81
+ # Run specs in random order to surface order dependencies. If you find an
82
+ # order dependency and want to debug it, you can fix the order by providing
83
+ # the seed, which is printed after each run.
84
+ # --seed 1234
85
+ config.order = :random
86
+
87
+ # Seed global randomization in this process using the `--seed` CLI option.
88
+ # Setting this allows you to use `--seed` to deterministically reproduce
89
+ # test failures related to randomization by passing the same `--seed` value
90
+ # as the one that triggered the failure.
91
+ Kernel.srand config.seed
92
+ =end
93
+ end
@@ -1,29 +1,29 @@
1
- require_relative './spec_helper'
2
-
3
- describe Clndr do
4
- describe 'Create and find calendar method' do
5
- before :all do
6
- Clndr.new(:test1)
7
- Clndr.new(:test2)
8
- end
9
-
10
- it '#new should add calendar to calendar bean' do
11
- expect(Clndr.calendar_basket[:test1]).to be_instance_of Clndr
12
- expect(Clndr.calendar_basket[:test2]).to be_instance_of Clndr
13
- expect(Clndr.calendar_basket[:test3]).to be_nil
14
- end
15
-
16
- it '#get_calendar should return calendar' do
17
- expect(Clndr.get_calendar(:test1)).to be_instance_of Clndr
18
- end
19
-
20
- it '#get_calendar should raise exception if calendar not found' do
21
- expect{Clndr.get_calendar(:undefined)}.to raise_error(Clndr::Error::CalendarNotFound)
22
- end
23
-
24
- it '#new should create calendar with string name' do
25
- Clndr.new('test calendar')
26
- expect(Clndr.get_calendar('test calendar')).to be_instance_of Clndr
27
- end
28
- end
1
+ require_relative './spec_helper'
2
+
3
+ describe Clndr do
4
+ describe 'Create and find calendar method' do
5
+ before :all do
6
+ Clndr.new(:test1)
7
+ Clndr.new(:test2)
8
+ end
9
+
10
+ it '#new should add calendar to calendar bean' do
11
+ expect(Clndr.calendar_basket[:test1]).to be_instance_of Clndr
12
+ expect(Clndr.calendar_basket[:test2]).to be_instance_of Clndr
13
+ expect(Clndr.calendar_basket[:test3]).to be_nil
14
+ end
15
+
16
+ it '#get_calendar should return calendar' do
17
+ expect(Clndr.get_calendar(:test1)).to be_instance_of Clndr
18
+ end
19
+
20
+ it '#get_calendar should raise exception if calendar not found' do
21
+ expect{Clndr.get_calendar(:undefined)}.to raise_error(Clndr::Error::CalendarNotFound)
22
+ end
23
+
24
+ it '#new should create calendar with string name' do
25
+ Clndr.new('test calendar')
26
+ expect(Clndr.get_calendar('test calendar')).to be_instance_of Clndr
27
+ end
28
+ end
29
29
  end
@@ -1,137 +1,137 @@
1
- require_relative './spec_helper'
2
-
3
- describe 'Clndr configuration' do
4
- shared_examples 'configurable' do
5
-
6
- it 'should be configurable' do
7
- expect(@calendar.template).to eq(Clndr::Template::SIMPLE)
8
- end
9
-
10
- it 'should get week_offset from config' do
11
- expect(@calendar.week_offset).to eq(0)
12
- end
13
-
14
- it 'should get start_with_month config' do
15
- expect(@calendar.start_with_month).to eq('2014-12-31')
16
- end
17
-
18
- it 'should get days_of_week config' do
19
- expect(@calendar.days_of_the_week.first).to eq('x')
20
- end
21
-
22
- it 'should get click_events config' do
23
- expect(@calendar.click_event[:click]).to include('js_function')
24
- end
25
-
26
- it 'should get targets config' do
27
- expect(@calendar.target[:nextButton]).to include('class')
28
- end
29
-
30
- it 'should get show_adjacent_months config' do
31
- expect(@calendar.show_adjacent_months).to be_falsey
32
- end
33
-
34
- it 'should get adjacent_days_change_month config' do
35
- expect(@calendar.adjacent_days_change_month).to be_truthy
36
- end
37
-
38
- it 'should get done_rendering config' do
39
- expect(@calendar.done_rendering).to include('callbaks_function')
40
- end
41
-
42
- it 'should get constraints_start config' do
43
- expect(@calendar.constraints_start).to eq('2014-12-31')
44
- end
45
-
46
- it 'should get constraints_end config' do
47
- expect(@calendar.constraints_end).to eq('2014-12-31')
48
- end
49
-
50
- it 'should get force_six_rows config' do
51
- expect(@calendar.force_six_rows).to be_falsey
52
- end
53
-
54
- it 'should get custom classes' do
55
- expect(@calendar.custom_classes[:today]).to eq('my-today')
56
- end
57
- end
58
-
59
- context 'init' do
60
- before do
61
- Clndr.configure do |config|
62
- config.template = Clndr::Template::SIMPLE
63
- config.week_offset = false
64
- config.start_with_month = '2014-12-31'
65
- config.days_of_the_week =['x'] * 7
66
- config.click_events do |event|
67
- event[:click] ='some_js_function(){}'
68
- end
69
- config.targets do |target|
70
- target[:nextButton] = '.some_class'
71
- end
72
- config.show_adjacent_months = false
73
- config.adjacent_days_change_month = true
74
- config.done_rendering = 'some_callbaks_function(){}'
75
- config.constraints_start = '2014-12-31'
76
- config.constraints_end = '2014-12-31'
77
- config.force_six_rows = false
78
- config.classes do |custom_class|
79
- custom_class[:today] = "my-today"
80
- end
81
- end
82
- @calendar = Clndr.new(:test)
83
- end
84
- it_should_behave_like 'configurable'
85
-
86
- it 'should convert week_offset config to digit' do
87
- Clndr.configure{|config| config.week_offset = true}
88
- @calendar = Clndr.new :test
89
- expect(@calendar.week_offset).to eq(1)
90
- end
91
- end
92
-
93
- context 'dinamycaly change config' do
94
- before :each do
95
- @calendar = Clndr.new(:test)
96
- @calendar.template = Clndr::Template::SIMPLE
97
- @calendar.week_offset = false
98
- @calendar.start_with_month = '2014-12-31'
99
- @calendar.days_of_the_week =['x'] * 7
100
- @calendar.click_event[:click] ='some_js_function(){}'
101
- @calendar.target[:nextButton] = '.some_class'
102
- @calendar.show_adjacent_months = false
103
- @calendar.adjacent_days_change_month = true
104
- @calendar.done_rendering = 'some_callbaks_function(){}'
105
- @calendar.constraints_start = '2014-12-31'
106
- @calendar.constraints_end = '2014-12-31'
107
- @calendar.force_six_rows = false
108
- @calendar.custom_classes[:today]= 'my-today'
109
- end
110
- it_should_behave_like 'configurable'
111
-
112
- it 'should convert week_offset config to digit' do
113
- @calendar.week_offset = true
114
- expect(@calendar.week_offset).to eq(1)
115
- end
116
- end
117
-
118
- it 'should fall to default settings when #defaul_settings call' do
119
- Clndr.default_settings
120
- @clndr = Clndr.new(:test)
121
- expect(@clndr.template).to eq(Clndr::Template::BLANK)
122
- expect(@clndr.custom_classes.length).to eq(0)
123
-
124
- end
125
-
126
- it 'should raise exception if date format wrong' do
127
- expect{Clndr.configure{|config| config.start_with_month = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
128
- expect{Clndr.configure{|config| config.constraints_start = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
129
- expect{Clndr.configure{|config| config.constraints_end = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
130
- end
131
-
132
- it 'should raise exception if date of month array contain more or less records' do
133
- expect{Clndr.configure{|config| config.days_of_the_week = ['a','b']}}.to raise_error(Clndr::Error::WrongDaysOfWeekArray)
134
- end
135
-
136
-
1
+ require_relative './spec_helper'
2
+
3
+ describe 'Clndr configuration' do
4
+ shared_examples 'configurable' do
5
+
6
+ it 'should be configurable' do
7
+ expect(@calendar.template).to eq(Clndr::Template::SIMPLE)
8
+ end
9
+
10
+ it 'should get week_offset from config' do
11
+ expect(@calendar.week_offset).to eq(0)
12
+ end
13
+
14
+ it 'should get start_with_month config' do
15
+ expect(@calendar.start_with_month).to eq('2014-12-31')
16
+ end
17
+
18
+ it 'should get days_of_week config' do
19
+ expect(@calendar.days_of_the_week.first).to eq('x')
20
+ end
21
+
22
+ it 'should get click_events config' do
23
+ expect(@calendar.click_event[:click]).to include('js_function')
24
+ end
25
+
26
+ it 'should get targets config' do
27
+ expect(@calendar.target[:nextButton]).to include('class')
28
+ end
29
+
30
+ it 'should get show_adjacent_months config' do
31
+ expect(@calendar.show_adjacent_months).to be_falsey
32
+ end
33
+
34
+ it 'should get adjacent_days_change_month config' do
35
+ expect(@calendar.adjacent_days_change_month).to be_truthy
36
+ end
37
+
38
+ it 'should get done_rendering config' do
39
+ expect(@calendar.done_rendering).to include('callbaks_function')
40
+ end
41
+
42
+ it 'should get constraints_start config' do
43
+ expect(@calendar.constraints_start).to eq('2014-12-31')
44
+ end
45
+
46
+ it 'should get constraints_end config' do
47
+ expect(@calendar.constraints_end).to eq('2014-12-31')
48
+ end
49
+
50
+ it 'should get force_six_rows config' do
51
+ expect(@calendar.force_six_rows).to be_falsey
52
+ end
53
+
54
+ it 'should get custom classes' do
55
+ expect(@calendar.custom_classes[:today]).to eq('my-today')
56
+ end
57
+ end
58
+
59
+ context 'init' do
60
+ before do
61
+ Clndr.configure do |config|
62
+ config.template = Clndr::Template::SIMPLE
63
+ config.week_offset = false
64
+ config.start_with_month = '2014-12-31'
65
+ config.days_of_the_week =['x'] * 7
66
+ config.click_events do |event|
67
+ event[:click] ='some_js_function(){}'
68
+ end
69
+ config.targets do |target|
70
+ target[:nextButton] = '.some_class'
71
+ end
72
+ config.show_adjacent_months = false
73
+ config.adjacent_days_change_month = true
74
+ config.done_rendering = 'some_callbaks_function(){}'
75
+ config.constraints_start = '2014-12-31'
76
+ config.constraints_end = '2014-12-31'
77
+ config.force_six_rows = false
78
+ config.classes do |custom_class|
79
+ custom_class[:today] = "my-today"
80
+ end
81
+ end
82
+ @calendar = Clndr.new(:test)
83
+ end
84
+ it_should_behave_like 'configurable'
85
+
86
+ it 'should convert week_offset config to digit' do
87
+ Clndr.configure{|config| config.week_offset = true}
88
+ @calendar = Clndr.new :test
89
+ expect(@calendar.week_offset).to eq(1)
90
+ end
91
+ end
92
+
93
+ context 'dinamycaly change config' do
94
+ before :each do
95
+ @calendar = Clndr.new(:test)
96
+ @calendar.template = Clndr::Template::SIMPLE
97
+ @calendar.week_offset = false
98
+ @calendar.start_with_month = '2014-12-31'
99
+ @calendar.days_of_the_week =['x'] * 7
100
+ @calendar.click_event[:click] ='some_js_function(){}'
101
+ @calendar.target[:nextButton] = '.some_class'
102
+ @calendar.show_adjacent_months = false
103
+ @calendar.adjacent_days_change_month = true
104
+ @calendar.done_rendering = 'some_callbaks_function(){}'
105
+ @calendar.constraints_start = '2014-12-31'
106
+ @calendar.constraints_end = '2014-12-31'
107
+ @calendar.force_six_rows = false
108
+ @calendar.custom_classes[:today]= 'my-today'
109
+ end
110
+ it_should_behave_like 'configurable'
111
+
112
+ it 'should convert week_offset config to digit' do
113
+ @calendar.week_offset = true
114
+ expect(@calendar.week_offset).to eq(1)
115
+ end
116
+ end
117
+
118
+ it 'should fall to default settings when #defaul_settings call' do
119
+ Clndr.default_settings
120
+ @clndr = Clndr.new(:test)
121
+ expect(@clndr.template).to eq(Clndr::Template::BLANK)
122
+ expect(@clndr.custom_classes.length).to eq(0)
123
+
124
+ end
125
+
126
+ it 'should raise exception if date format wrong' do
127
+ expect{Clndr.configure{|config| config.start_with_month = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
128
+ expect{Clndr.configure{|config| config.constraints_start = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
129
+ expect{Clndr.configure{|config| config.constraints_end = 'dsf'}}.to raise_error(Clndr::Error::WrongDateFormat)
130
+ end
131
+
132
+ it 'should raise exception if date of month array contain more or less records' do
133
+ expect{Clndr.configure{|config| config.days_of_the_week = ['a','b']}}.to raise_error(Clndr::Error::WrongDaysOfWeekArray)
134
+ end
135
+
136
+
137
137
  end