Permalink
Browse files

use mock storage if in test env

  • Loading branch information...
1 parent 07a7d3c commit 9b8a1114e1e1d4b14524c4c3cb553e1d2c7d730f @leafo leafo committed Mar 7, 2014
Showing with 5 additions and 4 deletions.
  1. +1 −2 app.moon
  2. +4 −2 storage_bucket.moon
View
@@ -1,7 +1,6 @@
-http = require "lapis.nginx.http"
with require "cloud_storage.http"
- .set http
+ .set require "lapis.nginx.http"
db = require "lapis.db"
lapis = require "lapis.init"
View
@@ -1,10 +1,12 @@
--
+config = require("lapis.config").get!
local bucket
-pcall ->
- bucket = require "secret.storage_bucket"
+unless config._name == "test"
+ pcall ->
+ bucket = require "secret.storage_bucket"
unless bucket
import MockStorage from require "cloud_storage.mock"

0 comments on commit 9b8a111

Please sign in to comment.