Skip to content
Browse files

Forgot to remove server spec

  • Loading branch information...
1 parent 62453cf commit 60dc154ea9966873d45ae17ed2426e4121eff094 @winton committed Jun 30, 2012
Showing with 0 additions and 65 deletions.
  1. +0 −65 spec/stasis/server_spec.rb
View
65 spec/stasis/server_spec.rb
@@ -1,65 +0,0 @@
-require 'spec_helper'
-require 'stasis/server'
-
-describe Stasis::Server do
-
- before(:all) do
- generate
- @thread = Thread.new do
- Stasis::Server.new($fixture, :server => 'localhost:6379/0')
- end
- end
-
- after(:all) do
- @thread.kill
- end
-
- it "should change time.html" do
- time = $files['time.html'].split("time")[1].strip
- new_time = Stasis::Server.push(
- :paths => [ 'time.html.haml' ],
- :redis => 'localhost:6379/0',
- :return => true
- )['time.html.haml'].split("time")[1].strip
- time.should_not == new_time
- generate_files
- new_time_from_file = $files['time.html'].split("time")[1].strip
- new_time_from_file.should == new_time
- new_time_from_file.should_not == time
- end
-
- it "should pass params" do
- params = Stasis::Server.push(
- :paths => [ 'params.html.haml' ],
- :params => { :test => true },
- :redis => 'localhost:6379/0',
- :return => true
- )['params.html.haml'].split("params")[1].strip
- eval(params).should == { :test => true }
- end
-
- it "should expire after ttl" do
- time = Stasis::Server.push(
- :paths => [ 'time.html.haml' ],
- :redis => 'localhost:6379/0',
- :return => true,
- :ttl => 1,
- :write => false
- )['time.html.haml'].split("time")[1].strip
- time2 = Stasis::Server.push(
- :paths => [ 'time.html.haml' ],
- :redis => 'localhost:6379/0',
- :return => true,
- :write => false
- )['time.html.haml'].split("time")[1].strip
- time.should == time2
- sleep 2
- time3 = Stasis::Server.push(
- :paths => [ 'time.html.haml' ],
- :redis => 'localhost:6379/0',
- :return => true,
- :write => false
- )['time.html.haml'].split("time")[1].strip
- time2.should_not == time3
- end
-end

0 comments on commit 60dc154

Please sign in to comment.
Something went wrong with that request. Please try again.