Browse Source

Use producing.nothing more;

bjorn 9 years ago
parent
commit
e7f430338a
8 changed files with 9 additions and 9 deletions
  1. 1 1
      tests/average.lua
  2. 1 1
      tests/find.lua
  3. 1 1
      tests/first.lua
  4. 1 1
      tests/last.lua
  5. 1 1
      tests/skip.lua
  6. 1 1
      tests/skipWhile.lua
  7. 2 2
      tests/take.lua
  8. 1 1
      tests/takeWhile.lua

+ 1 - 1
tests/average.lua

@@ -9,6 +9,6 @@ describe('average', function()
   end)
   end)
 
 
   it('produces nothing if there are no values to average', function()
   it('produces nothing if there are no values to average', function()
-    expect(Rx.Observable.empty():average()).to.produce({})
+    expect(Rx.Observable.empty():average()).to.produce.nothing()
   end)
   end)
 end)
 end)

+ 1 - 1
tests/find.lua

@@ -31,6 +31,6 @@ describe('find', function()
 
 
   it('completes after its parent completes if no value satisfied the predicate', function()
   it('completes after its parent completes if no value satisfied the predicate', function()
     local observable = Rx.Observable.fromRange(5):find(function() return false end)
     local observable = Rx.Observable.fromRange(5):find(function() return false end)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 end)
 end)

+ 1 - 1
tests/first.lua

@@ -7,7 +7,7 @@ describe('first', function()
 
 
   it('produces no elements if its parent produces no elements', function()
   it('produces no elements if its parent produces no elements', function()
     local observable = Rx.Observable.create(function(observer) return observer:onCompleted() end):first()
     local observable = Rx.Observable.create(function(observer) return observer:onCompleted() end):first()
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 
 
   it('produces the first element of its parent and immediately completes', function()
   it('produces the first element of its parent and immediately completes', function()

+ 1 - 1
tests/last.lua

@@ -7,7 +7,7 @@ describe('last', function()
 
 
   it('produces no elements if its parent produces no elements', function()
   it('produces no elements if its parent produces no elements', function()
     local observable = Rx.Observable.create(function(observer) return observer:onCompleted() end):last()
     local observable = Rx.Observable.create(function(observer) return observer:onCompleted() end):last()
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 
 
   it('produces the last element of its parent and immediately completes', function()
   it('produces the last element of its parent and immediately completes', function()

+ 1 - 1
tests/skip.lua

@@ -22,7 +22,7 @@ describe('skip', function()
 
 
   it('produces no values if it skips over all of the values of the original', function()
   it('produces no values if it skips over all of the values of the original', function()
     local observable = Rx.Observable.fromTable({1, 2}, ipairs):skip(2)
     local observable = Rx.Observable.fromTable({1, 2}, ipairs):skip(2)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 
 
   it('completes and does not fail if it skips over more values than were produced', function()
   it('completes and does not fail if it skips over more values than were produced', function()

+ 1 - 1
tests/skipWhile.lua

@@ -19,6 +19,6 @@ describe('skipWhile', function()
   it('produces no values if the predicate never returns false', function()
   it('produces no values if the predicate never returns false', function()
     local function isEven(x) return x % 2 == 0 end
     local function isEven(x) return x % 2 == 0 end
     local observable = Rx.Observable.fromTable({2, 4, 6}):skipWhile(isEven)
     local observable = Rx.Observable.fromTable({2, 4, 6}):skipWhile(isEven)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 end)
 end)

+ 2 - 2
tests/take.lua

@@ -7,12 +7,12 @@ describe('take', function()
 
 
   it('produces nothing if the count is zero', function()
   it('produces nothing if the count is zero', function()
     local observable = Rx.Observable.fromValue(3):take(0)
     local observable = Rx.Observable.fromValue(3):take(0)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 
 
   it('produces nothing if the count is less than zero', function()
   it('produces nothing if the count is less than zero', function()
     local observable = Rx.Observable.fromValue(3):take(-3)
     local observable = Rx.Observable.fromValue(3):take(-3)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 
 
   it('takes one element if no count is specified', function()
   it('takes one element if no count is specified', function()

+ 1 - 1
tests/takeWhile.lua

@@ -19,6 +19,6 @@ describe('takeWhile', function()
   it('produces no values if the predicate never returns true', function()
   it('produces no values if the predicate never returns true', function()
     local function isEven(x) return x % 2 == 0 end
     local function isEven(x) return x % 2 == 0 end
     local observable = Rx.Observable.fromTable({1, 3, 5}):takeWhile(isEven)
     local observable = Rx.Observable.fromTable({1, 3, 5}):takeWhile(isEven)
-    expect(observable).to.produce({})
+    expect(observable).to.produce.nothing()
   end)
   end)
 end)
 end)