Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to test prompt views with RSpec #5

Open
rdh opened this issue May 23, 2024 · 0 comments
Open

Ability to test prompt views with RSpec #5

rdh opened this issue May 23, 2024 · 0 comments

Comments

@rdh
Copy link
Owner

rdh commented May 23, 2024

Prompts live under app/prompts, very similar to app/views.

Would like to do RSpec something like this...

describe 'active_intelligence/chats.erb', type: :view do

  before { prepend_view_path 'app/prompts' }

  it('renders') { render }
end
``

1:  Probably register `prompts/` as a view directory and omit it from the description above.  
This seems like a clue... https://climber2002.github.io/blog/2015/04/06/digging-rails-how-rails-finds-your-templates-part-4/

2:  Would be nice to register the `prompts/` directory to be able to omit the explicit `type: :view` metadata
"Automatically Adding Metadata" in https://rspec.info/features/6-0/rspec-rails/directory-structure/ seems like a clue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant