summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-05-02 12:49:03 -0600
committermo khan <mo@mokhan.ca>2015-05-02 12:49:03 -0600
commit8e4d9b885a6181c26eb43e4599b01fcb14de8bbe (patch)
tree14459607f545f1e14fd50f989c4016de719f6a6e /spec
parent69e44556ffd03218f70f94cdbe64cfd554f26ad8 (diff)
add delayed_job recipe.
Diffstat (limited to 'spec')
-rw-r--r--spec/delayed_job_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/delayed_job_spec.rb b/spec/delayed_job_spec.rb
new file mode 100644
index 0000000..9ce4432
--- /dev/null
+++ b/spec/delayed_job_spec.rb
@@ -0,0 +1,26 @@
+describe "mokhan-myface::delayed_job" do
+ subject do
+ ChefSpec::SoloRunner.new do |node|
+ node.set['delayed_job'] = configuration
+ end.converge(described_recipe)
+ end
+
+ let(:username) { FFaker::Internet.user_name }
+ let(:configuration) do
+ {
+ 'username' => username
+ }
+ end
+
+ it 'creates the init.d script' do
+ expect(subject).to create_template("/etc/init.d/delayed_job")
+ .with_owner(username)
+ .with_group(username)
+ .with_mode("0744")
+ .with_variables(configuration)
+ end
+
+ it 'starts the delayed_job service' do
+ expect(subject).to start_service('delayed_job')
+ end
+end