Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rails 5.2 #132

Open
srudchandran opened this issue Oct 13, 2018 · 1 comment · May be fixed by #137
Open

Support for rails 5.2 #132

srudchandran opened this issue Oct 13, 2018 · 1 comment · May be fixed by #137

Comments

@srudchandran
Copy link

Tests failing with rails 5.2

Please enable support for rails 5.2

Using sqlite3 to run the tests.
-- create_table(:seeded_models, {:force=>true})
   -> 0.0130s
-- create_table(:seeded_model_no_primary_keys, {:id=>false, :force=>true})
   -> 0.0075s
-- create_table(:seeded_model_no_sequences, {:id=>false, :force=>true})
   -> 0.0064s

SeedFu::Runner
  should seed data from Ruby and gzipped Ruby files in the given fixtures directory
  should seed only the data which matches the filter, if one is given
  should use the SpecFu.fixtures_path variable to determine where fixtures are

SeedFu::Seeder
  should work with negative seeds
  should create a model if one doesn't exist
  should be able to handle multiple constraints
  should be able to create models from an array of seed attributes
  should be able to create models from a list of seed attribute hashes at the end of the args
  should update, not create, if constraints are met
  should create but not update with seed_once
  should default to an id constraint
  should require that all constraints are defined
  should not perform validation
  should raise an ActiveRecord::RecordNotSaved exception if any records fail to save (FAILED - 1)

SeedFu::Writer
  should successfully write some seeds out to a file and then import them back in (FAILED - 2)
  should support chunking (FAILED - 3)
  should support specifying the output to use 'seed_once' rather than 'seed' (FAILED - 4)

Failures:

  1) SeedFu::Seeder should raise an ActiveRecord::RecordNotSaved exception if any records fail to save
     Failure/Error: expect { SeededModel.seed(:fail_to_save => true, :title => "Foo") }.to raise_error(ActiveRecord::RecordNotSaved)
       expected ActiveRecord::RecordNotSaved but nothing was raised
     # ./spec/seeder_spec.rb:173:in `block (2 levels) in <top (required)>'

  2) SeedFu::Writer should successfully write some seeds out to a file and then import them back in
     Failure/Error: FileUtils.rm(@file_name)

     NameError:
       uninitialized constant FileUtils
     # ./spec/writer_spec.rb:9:in `block (2 levels) in <top (required)>'

  3) SeedFu::Writer should support chunking
     Failure/Error: FileUtils.rm(@file_name)

     NameError:
       uninitialized constant FileUtils
     # ./spec/writer_spec.rb:9:in `block (2 levels) in <top (required)>'

  4) SeedFu::Writer should support specifying the output to use 'seed_once' rather than 'seed'
     Failure/Error: FileUtils.rm(@file_name)

     NameError:
       uninitialized constant FileUtils
     # ./spec/writer_spec.rb:9:in `block (2 levels) in <top (required)>'

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /<<PKGBUILDDIR>>/spec/runner_spec.rb:7:in `block (2 levels) in <top (required)>'.


If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 0.42254 seconds (files took 0.56322 seconds to load)
17 examples, 4 failures

Failed examples:

rspec ./spec/seeder_spec.rb:172 # SeedFu::Seeder should raise an ActiveRecord::RecordNotSaved exception if any records fail to save
rspec ./spec/writer_spec.rb:12 # SeedFu::Writer should successfully write some seeds out to a file and then import them back in
rspec ./spec/writer_spec.rb:23 # SeedFu::Writer should support chunking
rspec ./spec/writer_spec.rb:35 # SeedFu::Writer should support specifying the output to use 'seed_once' rather than 'seed'

@pravi
Copy link

pravi commented Jan 8, 2019

Failures 2-4 was because of missing require 'fileutils', but failure 1 is still present.

jmkim added a commit to jmkim/seed-fu that referenced this issue Aug 29, 2019
Closes: mbleigh#132

Signed-off-by: Jongmin Kim <jmkim@pukyong.ac.kr>
@jmkim jmkim linked a pull request Aug 29, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@pravi @srudchandran and others