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 7003019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:00:24+00:00 2026-05-27T21:00:24+00:00

Please forgive my gherkin Given I have a module called Hello And it has

  • 0

Please forgive my gherkin

Given I have a module called Hello
And it has a method called world and a class called World
When I include the module in an RSpec spec 
And I call the method world 
Then it returns "hello world from method"
But when I create a World class
Then I get NameError: uninitialized constant World

module Hello
  def world
    p "hello world from method"
  end
  class World
     def initialize
       p "hello world from class"
     end
  end
end

describe "hello world" do
  include Hello
  it "call method" do
    world
  end

  it "call class" do
    World.new
  end
end
  • 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-27T21:00:25+00:00Added an answer on May 27, 2026 at 9:00 pm

    Forgive my Gherkin, and unless you intended something else (as that’s not clear)

    When I create a Hello::World class  
    Then I get an object of kind Hello::World
    
    it "should not catch fire on instantiation" do
      Hello::World.new.should_not be_nil
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please forgive my long question. I have an idea for a design that I
Please forgive me if this is an obvious one. I have an unknown amount
Veterans please forgive me for asking silly question. I understand that a class having
I have just started to look at .NET 3.5 so please forgive me if
Please forgive if this question has been asked numerous times. I recently installed Eclipse
I am new in ruby so please forgive the noobishness. I have a CSV
Please forgive me if this question has been asked and answered already. If so,
I am a dojo newbie so please forgive my ignorance. I have a dojox.mobile.EdgeToEdgeDataList
Please forgive the newbie question. I have an iphone game that currently uses lots
Please forgive my simple question. I have just started to use Matplotlib and I

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.