wisper-spectator v0.1.0
wisper-spectator
Handy Wisper.cr test helpers for the Spectator testing library.
Installation
-
Add the dependency to your
shard.yml
:development_dependencies: wisper-spectator: github: gmartsenkov/wisper-spectator
-
Run
shards install
Usage
require "wisper-spectator"
Spectator.describe "Wisper::Spectator" do
subject { User::Create.new(15) }
describe "#broadcast" do
it "works with a passed event class" do
subject.on(User::Create::Failure) do |failure|
expect(failure.reason).to eq "Some reason"
end
expect { subject.call }.to broadcast(User::Create::Failure)
end
end
end
Contributing
- Fork it (https://github.com/gmartsenkov/wisper-spectator/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Georgi Martsenkov - creator and maintainer
Repository
wisper-spectator
Owner
Statistic
- 0
- 0
- 0
- 0
- 2
- about 2 years ago
- September 7, 2022
License
MIT License
Links
Synced at
Sun, 24 Nov 2024 02:38:30 GMT
Languages