events_jp 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ $:.unshift(File.expand_path('../', __FILE__))
2
+ require 'spec_helper'
3
+
4
+ describe 'EventsJp::Event' do
5
+ describe '.get_all' do
6
+ context 'with keyword' do
7
+ before(:each) do
8
+ @result = EventsJp.get_events(keyword: 'Ruby', service_limit: 100)
9
+ end
10
+
11
+ it 'return each 100 events' do
12
+ expect(@result.count).to be >= 210
13
+ end
14
+ end
15
+
16
+ context 'no keyword' do
17
+ before(:each) do
18
+ @result = EventsJp.get_events(service_limit: 100)
19
+ end
20
+
21
+ it 'return each 100 events' do
22
+ expect(@result.count).to eq(400)
23
+ end
24
+ end
25
+ end
26
+ end