require "spec_helper" describe Flyboy::TaskCommentsController, type: :controller do routes { Flyboy::Engine.routes } let(:task) { FactoryGirl.create(:flyboy_task) } let(:task_comment) { FactoryGirl.create(:flyboy_task_comment, task: task) } describe "#create" do it "should create the task_comment" do post :create, task_id: task.id, task_comment: task_comment.attributes expect(assigns(:task_comment).persisted?).to be true end end end