-
Notifications
You must be signed in to change notification settings - Fork 7
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
specs integration #16
Comments
To be clear, I've implemented a simple plain ruby class specs for this (and they work fine), I just think this — or a more sophisticated technique — should be mentioned in Readme. |
@costa what are you planning to test? do you want an integration test that checks that email_preview works correctly in your setup? |
@ilyakatz Well it's a kinda "free" mail views test. |
@costa sorry, I don't understand. Can you give an example please? |
@costa can you share what your plain ruby class spec looks like? I'm not following what you're looking for and seeing a first-pass solution would be helpful to see what could be integrated into the core gem. |
I've just come up with a basic and simplistic outfit: spec/views/mail_spec.rb: require 'spec_helper'
describe MailPreview do
MailPreview.new.public_methods(false).each do |e|
example_ok e
end
end Plus: class RSpec::Core::ExampleGroup
def self.example_ok(e)
example "##{e}" do
subject.send(e).should_not be_blank
end
end
end p.s. |
I would like to use my mail preview code in my specs suite; will be grateful for any ideas on doing so — or substantial reasons not to.
The text was updated successfully, but these errors were encountered: