cypress-on-rails 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 423d83b19153f88f90b88295c62934aeb0a20e79cd1e4d700e9a01990972c400
4
- data.tar.gz: a5c6a528c074c22ce50206c8120290d9bf12d576348cd033342f593c3efd2d38
2
+ SHA1:
3
+ metadata.gz: 49942b0febcf64950936386fdbcbec0601534923
4
+ data.tar.gz: dba819774cec41583fb545fe2517a9baceaf029a
5
5
  SHA512:
6
- metadata.gz: 309a6837d21c5cd1814a3b84f9903edcc9d4ddb035f4f0dd8e435640ce16b96e21d51f52b7715d3b88f3f87956143bb53db9434cd151b1c53ba5505316f46cf4
7
- data.tar.gz: ec631f2f6a4a48240d1314911076888557da7f24e62ea7b9e0ad50be33f2367fd5581fe09699790a0cd55aa9dbc44d911252284d48e3aee595e5c4765790c91c
6
+ metadata.gz: dd5ab5135eeec0405b53356e5205956a5ea2f7230341663ac206b76292eb895eef297a96e28345f94dd78ffc8cbda2c54ac0b408dec097dc18edfb760da2ef53
7
+ data.tar.gz: ca4fb0a7f72ad6341fcb3c14aa22b6142ed95ffa3a77a5e6e229eeb3fc0d6e9290bb67edec65edb99ecae093044b4a795dc1611c6c5b193e764dcc76a1072e71
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2
3
+ - 2.3
4
+ - 2.5
5
+ - 2.6
4
6
 
5
7
  #addons:
6
8
  # artifacts:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [1.5.1]
2
+ [Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.5.0...v1.5.1
3
+
4
+ ### Fixed
5
+ * fix FactoryBot Trait not registered error [PR 43](https://github.com/shakacode/cypress-on-rails/pull/43)
6
+
1
7
  ## [1.5.0]
2
8
  [Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.4.2...v1.5.0
3
9
 
data/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.com/shakacode/cypress-on-rails.svg?branch=master)](https://travis-ci.org/shakacode/cypress-on-rails) [![Gem Version](https://badge.fury.io/rb/cypress-on-rails.svg)](https://badge.fury.io/rb/cypress-on-rails)
4
4
 
5
+ ----
6
+
7
+ This project is sponsored by the software consulting firm [ShakaCode](https://www.shakacode.com), creator of the [React on Rails Gem](https://github.com/shakacode/react_on_rails). We focus on React front-ends, often with Ruby on Rails or Gatsby. The best way to see what we do is to see the details of [our recent work](https://www.shakacode.com/recent-work). Feel free to engage in discussions around this gem at our [forum category for Cypress](https://forum.shakacode.com/c/cypress-on-rails/55).
8
+
9
+ ----
10
+
5
11
  Gem for using [cypress.io](http://github.com/cypress-io/) in Rails and ruby rack applications
6
12
  with the goal of controlling State as mentioned in [Cypress Best Practices](https://docs.cypress.io/guides/references/best-practices.html#Organizing-Tests-Logging-In-Controlling-State)
7
13
 
@@ -45,9 +45,15 @@ module CypressOnRails
45
45
  @dir_system = dir_system
46
46
  end
47
47
 
48
- def create(*args)
48
+ def create(*options)
49
49
  load_files
50
- factory.create(*args)
50
+ factory_name = options.shift
51
+ if options.last.is_a?(Hash)
52
+ args = options.pop
53
+ else
54
+ args = {}
55
+ end
56
+ factory.create(factory_name,*options.map(&:to_sym),args.symbolize_keys)
51
57
  end
52
58
 
53
59
  def create_list(*args)
@@ -1,3 +1,3 @@
1
1
  module CypressOnRails
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
@@ -43,7 +43,22 @@ RSpec.describe CypressOnRails::SmartFactoryWrapper do
43
43
 
44
44
  it 'it sends delegates create to the factory' do
45
45
  subject.create(:user)
46
- expect(factory_double).to have_received(:create).with(:user)
46
+ expect(factory_double).to have_received(:create).with(:user, {})
47
+ end
48
+
49
+ it 'it sends delegates create to the factory and symbolize keys' do
50
+ subject.create(:user, {'name' => "name"})
51
+ expect(factory_double).to have_received(:create).with(:user, {name: 'name'})
52
+ end
53
+
54
+ it 'it sends delegates create to the factory and symbolize keys with trait' do
55
+ subject.create(:user, 'trait1', {'name' => "name"})
56
+ expect(factory_double).to have_received(:create).with(:user, :trait1, {name: 'name'})
57
+ end
58
+
59
+ it 'it sends delegates create to the factory and symbolize keys with only trait' do
60
+ subject.create(:user, 'trait2')
61
+ expect(factory_double).to have_received(:create).with(:user, :trait2, {})
47
62
  end
48
63
 
49
64
  it 'it sends delegates create_list to the factory' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cypress-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - miceportal team
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-10-06 00:00:00.000000000 Z
12
+ date: 2020-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -303,7 +303,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  - !ruby/object:Gem::Version
304
304
  version: '0'
305
305
  requirements: []
306
- rubygems_version: 3.0.3
306
+ rubyforge_project:
307
+ rubygems_version: 2.6.14.4
307
308
  signing_key:
308
309
  specification_version: 4
309
310
  summary: Integrates cypress with rails or rack applications