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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:59:21+00:00 2026-05-27T09:59:21+00:00

Or am I misunderstanding something? Partial lives in: app/views/admin/command_templates/_fillerup.html.erb This spec passes (there is

  • 0

Or am I misunderstanding something?

Partial lives in:

app/views/admin/command_templates/_fillerup.html.erb

This spec passes (there is no “fill” or “_fill” in the view directory):

describe "GET fillerup" do
  it "assigns some stuff and renders a partial" do
    should render_template "admin/command_templates/_fill"     # I expected failure
    should render_template "admin/command_templates/_fillerup" # "Correct" test
  end
end

This fails (as I expect):

describe "GET fillerup" do
  it "assigns some stuff and renders a partial" do
    should render_template "admin/command_templates/_fillerupp" # extra "p"
  end
end

It acts like it’s doing a start_with? on the path, perhaps to ignore extensions, or…?

rspec-rails 2.7.0, rails 3.1.2; other info available on request.

Verifying the behavior exists (or doesn’t) would be helpful as a sanity check.

  • 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-27T09:59:22+00:00Added an answer on May 27, 2026 at 9:59 am

    Check out the code for render_template – many of those methods do pattern matching via regex, which is going to match similarly to a starts_with?, at least in the same sense that the pattern “Joe” is going to match the string “Joe Smith”, and “Joe Blank”. I’m not doing the pattern matching justice here, but this is just an example.

    Pattern matching this way is mostly for convenience, as I understand it, so you don’t have to be overly specific in your tests, which makes your test framework a little less brittle. You can typically get away with this without worrying, because templates often don’t have names that are so similar.

    If you need to match only a specific template (and not the other) you can add an additional conditional test, something like:

    should render_template('x')
    should_not render_template('xy')
    

    …or something similar, which should effectively filter out templates that start with similar names, but which are not the templates in which you are interested.

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

Sidebar

Related Questions

Ok so I think I must be misunderstanding something about SQL queries. This is
I think I'm misunderstanding something about how this works. This is my fluent mapping:
I seem to get something fundamentally wrong. I have this HTML <div id=thumbnails> <a
I think that I am misunderstanding something about how jquery $(this) works. In my
Perhaps I'm misunderstanding how this should work, but I've created an object in the
It turns out this whole misunderstanding of the open() versus fopen() stems from a
this question can create a misunderstanding: I know I have to use CSS to
I'm worried that I am misunderstanding something about stack behavior in C. Suppose that
I'm sure I'm misunderstanding something about ack's file/directory ignore defaults, but perhaps somebody could
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbuser1'@'localhost This is probably something stupid, but

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.