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

FactoryGirl does not work #20

Open
chrhsmt opened this issue Sep 9, 2015 · 0 comments
Open

FactoryGirl does not work #20

chrhsmt opened this issue Sep 9, 2015 · 0 comments

Comments

@chrhsmt
Copy link

chrhsmt commented Sep 9, 2015

I develop rails app using redshift, but rspec using FactoryGirl does not work.

FactoryGirl.define do
  factory :access_log, class: AccessLog do
    datetime { Time.now }
    .....
  end
end
RSpec.describe 'Controller', type: :request do
  let!(:access_log) { FactoryGirl.create(:access_log) }
  describe 'GET /' do
    it do
      get "/", params, headers
      .......
    end
  end
end
bundle exec rspec ./spec/request/....rb

     Failure/Error: let!(:access_log) { FactoryGirl.create(:access_log) }
     NoMethodError:
       undefined method `has_precision?' for #<ActiveRecord::ConnectionAdapters::Redshift::OID::DateTime:0x007ff491cce150>

what is has_precision ? It seems to not to be defined.

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

No branches or pull requests

1 participant