-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
undefined method `refinery_login_with' #2836
Comments
$ rails -v Gemfile from the main app: source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master'
gem 'refinerycms-i18n', git: 'https://github.com/refinery/refinerycms-i18n', branch: 'master'
gem 'quiet_assets'
# Add support for refinerycms-acts-as-indexed
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']
# Add support for refinerycms-wymeditor
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.0']
gem 'seo_meta', git: 'https://github.com/parndt/seo_meta', branch: 'master'
gem 'paper_trail', git: 'https://github.com/airblade/paper_trail', branch: 'master'
gem 'refinerycms-my_items', path: 'vendor/extensions' Gemfile from the extension: source "https://rubygems.org"
gemspec
git 'https://github.com/refinery/refinerycms.git', :branch => 'master' do
gem 'refinerycms'
group :development, :test do
gem 'refinerycms-testing'
end
end
# Database Configuration
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'activerecord-jdbcmysql-adapter'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'jruby-openssl'
end
platforms :ruby do
gem 'sqlite3'
gem 'mysql2'
gem 'pg'
end
group :development, :test do
platforms :ruby do
require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'therubyracer', '~> 0.11.4'
end
end
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'refinerycms-i18n', git: 'https://github.com/refinery/refinerycms-i18n', branch: 'master' |
Trying to diagnose the problem but I'm at a loss -- I can see the module where the function is defined ( So why is the module not working? I can't tell what has changed to break this functionality :) |
It did not know what type of spec it was. Fixed in #2843 |
Ahhh... "type: :feature" on the spec definition? I think that used to be implicit, and now isn't -- correct? Thanks, Chris
|
That's right |
@CJBrew you can check this - https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#file-type-inference-disabled. |
Thanks @simi. I have seen the warnings about implicit type inference -- I have previously added the "infer type" option in spec_helper.rb to work around it but it seems cleaner to add it for each generated spec. As per that upgrade information, should the generator create a |
@parndt thanks for the commit above^. I think this one is still required: The only (?) problem now left appears to be the accessibility of members (the attr_accessible change) which I know is open on another ticket. |
Fixes #2836 by updating rspec syntax in generated files.
Can you open a PR? |
Will do - though my branch contains stuff you've already added -- hopefully there is no conflict and you can just merge the change. If not I'll just update my master branch and cherry-pick the commit first. I don't know exactly how pull requests work from the receiving side. |
On creating a new engine, it's not possible to run the RSpec tests.
I get an error of undefined method for "refinery_login_with" -- this is in the Feature spec at https://github.com/refinery/refinerycms/blob/master/core/lib/generators/refinery/engine/templates/spec/features/refinery/namespace/admin/plural_name_spec.rb.erb
It is apparently not including the helper function at refinerycms/testing/lib/refinery/testing/feature_macros/authentication.rb.
_undefined method "refinery_login_with" for RSpec::ExampleGroups::Refinery::MyItems::Admin::MyItems:Class (NoMethodError)_
The full error output:
The text was updated successfully, but these errors were encountered: