Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6816995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:59:38+00:00 2026-05-26T20:59:38+00:00

I’m working on an old Rails 2.3.8 which doesn’t have any testing and I’m

  • 0

I’m working on an old Rails 2.3.8 which doesn’t have any testing and I’m trying to add some tests using rspec with machinist to the app.

I’ve installed rspec 1.3.0 & 1.3.2 and ran the generator script.

I followed the instructions on:
https://github.com/notahat/machinist/tree/1.0-maintenance

Adding the following to /spec/blueprints.rb

require 'machinist/active_record'
require 'sham'

And the following line to spec_helper.rb

require File.expand_path(File.dirname(__FILE__) + "/blueprints")

I’ve created a blueprint for my User and when I try to use ‘User.make!’ in my spec helper (within a login method) I get this error:

NoMethodError in 'CategoriesController As a logged in user#index should render index'
undefined method `make!' for #<Class:0x7f42b9deea10>

Here is my spec_helper method:

def login_user
  user = User.make!
  @request.session[:user_id] = user.id
  @current_user ||= User.find_by_id(user.id)
end

It’s been a while since I’ve touched a Rails 2.x app so maybe I’m missing something here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:59:38+00:00Added an answer on May 26, 2026 at 8:59 pm

    Solved:

    I shouldn’t be using make! in this old version of machinist

    I ended up writing a little test for machinist to see if it will load my blueprints and I selected a model which is less complicated, ie: one validation not 10.

    describe "machinist" do
      it "should create a category" do
        category = Category.make
        category.name.should == "General"
      end
    end
    

    This worked, so it was mostly to do with validations and small syntax mistakes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.