Bryan,

  I don't understand exactly what you mean with this comment.

Viv


On Friday, April 18, 2014 1:37 PM, Bryan Yap <notifications@github.com> wrote:
 
In spec/views/posts/new.html.erb_spec.rb:
> +
> +describe "posts/new" do
> +  before(:each) do
> +    assign(:post, stub_model(Post,
> +      :title => "MyString",
> +      :author => "MyString",
> +      :content => "MyText"
> +    ).as_new_record)
> +  end
> +
> +  it "renders new post form" do
> +    render
> +
> +    # Run the generator again with the --webrat flag if you want to use webrat matchers
> +    assert_select "form[action=?][method=?]", posts_path, "post" do
> +      assert_select "input#post_title[name=?]", "post[title]" 
this could be replaced with
view.should have_css 'input#post_title[name="post[title]"]' 
which would be more RSpec, this syntax you are using is the default Rails minitest syntax
—
Reply to this email directly or view it on GitHub.